perminder-klair / angular-soundmanager2

SoundManager2 Music Player for AngularJs
http://perminder-klair.github.io/angular-soundmanager2/
MIT License
169 stars 108 forks source link

'add-all' directive request #19

Open denitto opened 9 years ago

denitto commented 9 years ago

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.

perminder-klair commented 9 years ago

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 commented 9 years ago

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

denitto commented 9 years ago

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

denitto commented 9 years ago

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

perminder-klair commented 9 years ago

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

denitto commented 9 years ago

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

denitto commented 9 years ago

@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 commented 9 years ago

@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.

codesalsa commented 8 years ago

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

GunaSekhar1 commented 8 years ago

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