Merge lp:~mhall119/summit/refresh-for-video into lp:summit

Proposed by Michael Hall
Status: Merged
Approved by: Michael Hall
Approved revision: 490
Merged at revision: 490
Proposed branch: lp:~mhall119/summit/refresh-for-video
Merge into: lp:summit
Diff against target: 40 lines (+18/-1)
1 file modified
summit/schedule/templates/schedule/virtual_meeting.html (+18/-1)
To merge this branch: bzr merge lp:~mhall119/summit/refresh-for-video
Reviewer Review Type Date Requested Status
Adnane Belmadiaf Approve
Review via email: mp+150726@code.launchpad.net

Commit message

Adds a javascript refresh to the youtube placeholder image to continue checking for a video url

Description of the change

Adds a javascript refresh to the youtube placeholder image to continue checking for a video url

To post a comment you must log in.
Revision history for this message
Adnane Belmadiaf (daker) wrote :

+1

Revision history for this message
Adnane Belmadiaf (daker) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/schedule/templates/schedule/virtual_meeting.html'
2--- summit/schedule/templates/schedule/virtual_meeting.html 2013-02-27 00:30:43 +0000
3+++ summit/schedule/templates/schedule/virtual_meeting.html 2013-02-27 05:33:20 +0000
4@@ -20,6 +20,7 @@
5 <meta property="og:type" content="article" />
6 <meta itemprop="name" content="{{ meeting.title }}{% if schedule.date %} - {{ schedule.date|strftime:"%Y-%m-%d" }}{% endif %}{% if schedule.room %}{{ schedule.room.title }}{% endif %}" />
7 <meta itemprop="description" content="{{ meeting.description|linebreaks|striptags }}" />
8+
9 {% endblock %}
10
11 {% block sub_nav_links %}
12@@ -104,11 +105,27 @@
13 </div>
14 <div class="row">
15 <div class="span-4">
16- <div align="center">
17+ <div id="broadcast_video" align="center">
18 {% if meeting.broadcast_url %}
19 <iframe width="420" height="295" src="{{ meeting.broadcast_url }}" frameborder="0" allowfullscreen></iframe>
20 {% else %}
21 <img width="420" height="295" src="/media/images/youtube_placeholder.png">
22+ <script>
23+ function update_video()
24+ {
25+ var meeting = null;
26+ $.getJSON('/api/meeting/{{ meeting.id }}/',
27+ function(meeting) {
28+ if (meeting.broadcast_url != '') {
29+ $('#broadcast_video').html('<iframe width="420" height="295" src="'+meeting.broadcast_url+'" frameborder="0" allowfullscreen></iframe>');
30+ } else {
31+ setTimeout(update_video, 20000);
32+ }
33+ }
34+ );
35+ }
36+ setTimeout(update_video, 20000);
37+ </script>
38 {% endif %}
39 </div>
40 <iframe src="http://webchat.freenode.net?channels={% for ai in agenda_items %}{{ ai.room.irc_channel }}{% endfor %}&uio=Mj10cnVlJjQ9dHJ1ZSY5PXRydWUmMTA9dHJ1ZSYxMz1mYWxzZSYxND1mYWxzZQbf" width="100%" height="395"></iframe>

Subscribers

People subscribed via source and target branches