git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 77865f5c authored by Mike Sheldon's avatar Mike Sheldon

Make sure player only gets loaded after everything else is readyls

parent 00ae6d5f
......@@ -12,11 +12,13 @@
<div id='player-container'>
{include file='player.tpl'}
<script type="text/javascript">
{if isset($this_user)}
playerInit(false, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", "{$radio_session}");
{else}
playerInit(false, false, false, "{$radio_session}");
{/if}
$(document).ready(function() {ldelim}
{if isset($this_user)}
playerInit(false, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", "{$radio_session}");
{else}
playerInit(false, false, false, "{$radio_session}");
{/if}
{rdelim});
</script>
</div>
{/if}
......
......@@ -6,11 +6,13 @@
{include file='player.tpl'}
<div id='error'></div>
<script type="text/javascript">
{if isset($this_user)}
playerInit(false, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", "{$radio_session}");
{else}
playerInit(false, false, false, "{$radio_session}");
{/if}
$(document).ready(function() {ldelim}
{if isset($this_user)}
playerInit(false, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", "{$radio_session}");
{else}
playerInit(false, false, false, "{$radio_session}");
{/if}
{rdelim});
</script>
<br /><br />
<div id='flattrstream' style='width: 50%; display: none;'>
......
......@@ -9,12 +9,14 @@
<div id='player-container'>
{include file='player.tpl'}
<script type="text/javascript">
var playlist = [{ldelim}"artist" : "{$track->artist_name|escape:'javascript'}", "album" : "{$track->album_name|escape:'javascript'}", "track" : "{$track->name|escape:'javascript'}", "url" : "{$track->streamurl}"{rdelim}];
{if isset($this_user)}
playerInit(playlist, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", false);
{else}
playerInit(playlist, false, false, false);
{/if}
$(document).ready(function() {ldelim}
var playlist = [{ldelim}"artist" : "{$track->artist_name|escape:'javascript'}", "album" : "{$track->album_name|escape:'javascript'}", "track" : "{$track->name|escape:'javascript'}", "url" : "{$track->streamurl}"{rdelim}];
{if isset($this_user)}
playerInit(playlist, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", false);
{else}
playerInit(playlist, false, false, false);
{/if}
{rdelim});
</script>
</div>
{/if}
......
......@@ -5,11 +5,13 @@
<h4>{t user=$me->name|capitalize}%1's Recommended Radio{/t}</h4><br />
{include file='player.tpl'}
<script type="text/javascript">
{if isset($this_user)}
$(document).ready(function() {ldelim}
{if isset($this_user)}
playerInit(false, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", "{$radio_session}");
{else}
{else}
playerInit(false, false, false, "{$radio_session}");
{/if}
{/if}
{rdelim});
</script>
</div>
</center>
......
......@@ -12,11 +12,13 @@
{include file='player.tpl'}
<script type="text/javascript">
{if isset($this_user)}
playerInit(false, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", "{$radio_session}");
{else}
playerInit(false, false, false, "{$radio_session}");
{/if}
$(document).ready(function() {ldelim}
{if isset($this_user)}
playerInit(false, "{$this_user->getScrobbleSession()}", "{$this_user->getWebServiceSession()}", "{$radio_session}");
{else}
playerInit(false, false, false, "{$radio_session}");
{/if}
{rdelim});
</script>
</div>
</center>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment