solved Play random playlist tracks using jamroom jplayer

johnchansa
@johnchansa
9 years ago
195 posts
Is it possible for the jamroom player to automatically shuffle or randomly play playlist tracks?

There is a shuffle button on the player but it can only be set manually. Is there code I could use to auto shuffle or randomize a playlist?
updated by @johnchansa: 02/02/15 02:31:07AM
brian
@brian
9 years ago
10,148 posts
Yeah you can do this - the {jrCore_media_player} template function supports searches just like {jrCore_list} so you can so something like:

{jrCore_media_player type="jrPlaylist_player_dark" module="jrAudio" field="audio_file"  search="_item_id > 0" order_by="audio_title random" limit=20}

Adjust the "search" parameter to suit your needs.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
johnchansa
@johnchansa
9 years ago
195 posts
Thanks..
My playlists have both audio and soundcloud tracks.Can the function be made to work for both?
See link to playlist below(it's for the site radio player.....)

http://www.zmusicportal.com/radio_player/playlist_id=1/title=Top%20Hits%20Selection/autoplay=true
updated by @johnchansa: 01/02/15 07:30:00AM
brian
@brian
9 years ago
10,148 posts
johnchansa:
Thanks..
My playlists have both audio and soundcloud tracks.Can the function be made to work for both?
See link to playlist below(it's for the site radio player.....)

[url] http://www.zmusicportal.com/radio_player/playlist_id=1/title=Top%20Hits%20Selection/autoplay=true[/url]

Yeah - but then it won't be random - instead of doing a search you would just have to pass in the playlist item, and create a playlist on the site of the tracks you want to include in the player - i.e.:

{jrCore_media_player module="jrPlaylist" item_id=#}

Where "#" is the item ID of the playlist you have created.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
johnchansa
@johnchansa
9 years ago
195 posts
Ok..
I guess that's what the playlist module already does.
I'll work with the info you have provided and maybe create separate playlists for soundcloud and audio tracks.

Cheers!
brian
@brian
9 years ago
10,148 posts
johnchansa:
Ok..
I guess that's what the playlist module already does.
I'll work with the info you have provided and maybe create separate playlists for soundcloud and audio tracks.

Cheers!

Sounds good - thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags