This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
oliver-screen/oliver_screen/templates/public/now_playing.html
T
2015-02-14 16:28:37 +01:00

39 lines
1.3 KiB
HTML

{% load staticfiles %}
{% if now_playing %}
{% if now_playing.video %}
<script type="text/javascript">
function other_video_playing() {
var now_playing_pattern = /{{ now_playing.video.videoId }}/;
return ! now_playing_pattern.test( ytplayer.getVideoUrl() );
}
function play() {
if(ytplayer) {
// start the video (if we have'nt allready)
if( other_video_playing() ) {
// show the player
$("#player").show();
ytplayer.loadVideoById("{{ now_playing.video.videoId }}", {{ now_playing.video.start }}, "hd720");
}
}
}
play();
</script>
{% else %}
<script type="text/javascript">
$("#player").delay(1000).hide();
</script>
{% if now_playing.image %}
<img src="{{ now_playing.image}}" class="now_playing" /><br />
{% endif %}
{% endif %}
<img src="{% static 'spectrum-analyzer.gif' %}" /> {{ now_playing.artist}} - {{ now_playing.title }} ♪♫<br />
{% else %}
<script type="text/javascript">
$("#player").delay(1000).hide();
</script>
<img src="{% static 'no_music_makes_me_sick_by_sakgaa.jpg' %}" /><br />
:[
{% endif %}