jrPlaylist - Radio station

johnchansa
@johnchansa
10 years ago
195 posts
1.How can I set up my radio station to play all audios or latest audios on my site?I've seen this on Motagator Music.
http://motagator.com/radio_player/id=all
http://motagator.com/radio_player/id=latest

2.Is there a way to make a playlist auto shuffle(random play) using the jplayer in jamroom 5?
updated by @johnchansa: 03/28/14 11:38:57PM
paul
@paul
10 years ago
4,326 posts
I had to look to see how I did it ;-)
Its pretty simple, here's the template for the radio popup -
{jrCore_include template="meta.tpl"}
<body>

<div style="background-color:#c8d088;">
{jrCore_image image="logo.png" class="img_scale" alt=$_conf.jrCore_system_name title=$_conf.jrCore_system_name style="max-width:425px;max-height:80px;"}
    <h1 style="color:#222;">
    {if isset($id) && $id == 'all'}
        All Tracks Radio
    {elseif isset($album)}
        {$album|urldecode}
    {elseif isset($id) && $id == 'latest'}
        New Tracks Radio
    {else}
        {$genre|ucwords} Radio
    {/if}
    </h1>
</div>

<div class="container">
    <div class="row">
        <div class="col12 last">
            {if isset($id) && $id == all}
                {jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" order_by="audio_title random" limit=100 autoplay=true}
            {elseif isset($id) && $id == latest}
                {jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" order_by="_item_id desc" limit=100 autoplay=true}
            {elseif isset($genre)}
                {jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" search="audio_genre = `$genre`" order_by="_item_id desc" limit=100 autoplay=true}
            {elseif isset($album)}
                {jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" search="audio_album = `$album`" order_by="audio_order numerical_asc" limit=100 autoplay=true}
            {/if}
        </div>
    </div>
</div>

</body>
</html>
The various parameters are passed in the url.
Note the first ('all') option which specifies tracks in a random order.
hth
Pa


--
Paul Asher - JR Developer and System Import Specialist
johnchansa
@johnchansa
10 years ago
195 posts
Thanks...I'll give it a try

Tags