Mercurial > public > bravenewsurf
comparison bns_website/templates/videos/index.html @ 61:1d2473f4bcaa
Fix bug in template that prevented the embedded video player from playing the entire playlist.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 19 Nov 2011 14:39:28 -0600 |
parents | a0d3bc630ebd |
children | 4de34a1446a0 |
comparison
equal
deleted
inserted
replaced
60:a0d3bc630ebd | 61:1d2473f4bcaa |
---|---|
21 | 21 |
22 var player; | 22 var player; |
23 function onYouTubePlayerAPIReady() { | 23 function onYouTubePlayerAPIReady() { |
24 player = new YT.Player('player', { | 24 player = new YT.Player('player', { |
25 videoId: '{{ videos|first }}', | 25 videoId: '{{ videos|first }}', |
26 {% if playlist %} | 26 {% if videos|length > 1 %} |
27 playerVars: { playlist: [ | 27 playerVars: { playlist: [ |
28 {% for video in videos|slice:"1:" %} | 28 {% for video in videos|slice:"1:" %} |
29 {% if not forloop.first %},{% endif %}'{{ video }}' | 29 {% if not forloop.first %},{% endif %}'{{ video }}' |
30 {% endfor %} ]}, | 30 {% endfor %} ]}, |
31 {% endif %} | 31 {% endif %} |