angular-soundmanager2 icon indicating copy to clipboard operation
angular-soundmanager2 copied to clipboard

'add-all' directive request

Open denitto opened this issue 10 years ago • 10 comments

Hi Perminder:

play-all is a rad directive. Would it be easy to include an add-all directive that enqueues all tracks in list 'songs'?

link to current directives for anyone interested: http://perminder-klair.github.io/angular-soundmanager2/ref/directives.html

Thanks! Nick D.

denitto avatar Feb 17 '15 02:02 denitto

Done, try this:

<button play-all="songs" data-play="false">Add all</button>

This will just add tracks and won't play them.

perminder-klair avatar Feb 17 '15 17:02 perminder-klair

For ref: https://github.com/perminder-klair/angular-soundmanager2/commit/a73c5ed256662de71ea6e3afc1ab5ab90e1e1e08

perminder-klair avatar Feb 17 '15 17:02 perminder-klair

wow, so fast! Thanks, man. downloading/testing now

denitto avatar Feb 17 '15 20:02 denitto

Just tested this. It does add all the tracks in the list without playing, but it also erases all tracks in the playlist.

denitto avatar Feb 17 '15 21:02 denitto

@denitto need to do something about that. Will try tonight.

perminder-klair avatar Feb 18 '15 17:02 perminder-klair

hey @perminder-klair! Was this ever resolved? About to finally launch our site and this is one of the last bugs.

denitto avatar Apr 29 '15 01:04 denitto

@perminder-klair: temporarily took the line that clears the playlist out so that we can launch. lmk if you make a change to the code.

got another quick request regarding this: now that the playlist is not cleared, any way to feed a track id/link in for where to start when you use: play-all="these_tracks" data-play="true"?

denitto avatar May 01 '15 00:05 denitto

@perminder-klair: last update. Found a crazy bug (side effect, actually) whereby SoundCloud tracks are actually screwing up the player indexing! Took me forever and a couple of hairs to track down.

Basically, it appears that soundManager object is auto-acquiring sm_objects that come in from SoundCloud stream method somehow. You probably understand SoundManager better than me so that may make sense to you... Anyway, all the player functions index from the soundManger.soundIDs, and that basically diverges from the playlist array the more you navigate around in my case, (as soundManger.soundIDs grows automatically as you navigate, since it is acquiring every stream object that SoundCloud returns!)

I made a quickfix by destroying any IDs from soundManger.soundIDs that are not in the playlist. It's just a workaround for now, because I couldn't successfully switch the indexing to the playlist array... Anywho, just wanted to point this out. Could be a quick change for you if this makes sense.

denitto avatar May 01 '15 22:05 denitto

Hi Perminder

I have one issue at the end of my app coding. I have created Music Albums and for each album there is a button to "Play all songs". In teh first instance its playing super fine. It adds all songs to the list and playing. But at the playing state, if I click to play all songs from another album. It stops and Nothing plays afterwards.

Can you provide me a solution for this?

Thanks

codesalsa avatar Apr 22 '16 22:04 codesalsa

Play all button is playing only first song, not all the songs in an array. can you please help me.

GunaSekhar1 avatar Jul 19 '16 06:07 GunaSekhar1