else:
return self.slug + '.' + self.stream_type
+ @property
+ def snapshot_url(self):
+ url = ''
+ if self.server.type == 'stream-m':
+ url = 'http://' + self.server.host + ':' + self.server.port + \
+ '/snapshot/' + self.slug
+ return url
+
@property
def url(self):
return 'http://' + self.server.host + ':' + self.server.port + '/' + self.mount_point
<tbody>
{% for stream in course.livestream.all|from_course_type:type %}
<tr>
- <td {% if forloop.counter0 == 0 %}class="border-top"{% endif %} width="60%"><a href="{% url teleforma-conference-detail stream.conference.id %}" title="{% trans "View" %}"><img src="{{ STATIC_URL }}/teleforma/images/network-wireless.png" style="vertical-align:middle" alt="" /> {{ stream.slug }}</a></td>
- <td {% if forloop.counter0 == 0 %}class="border-top"{% endif %} width="35%">{{ stream.conference.date_begin }}</td>
- <td {% if forloop.counter0 == 0 %}class="border-top"{% endif %} width="5%" align="center">
+ <td {% if forloop.counter0 == 0 %}class="border-top"{% endif %} width="30%">
+ {% if stream.streaming %}
+ <a href="{% url teleforma-conference-detail stream.conference.id %}" title="{% trans "View" %}">
+ <img id="snapshot-{{ stream.course.code }}" src="{{ stream.snapshot_url }}" width="100%" alt="snapshot" />
+ </a>
+ {% else %}
+ {% trans "The conference is not started yet. Please wait..." %}
+ {% endif %}
+ </td>
+ <td {% if forloop.counter0 == 0 %}class="border-top"{% endif %} width="60%" style="padding-left: 1em;">
+ <div>
+ <dl class="listing" style="font-size: 1.2em;">
+ <dt>{% trans "Title" %}</dt><dd>{{ stream.conference.course.title }}</dd>
+ <dt>{% trans "Session" %}</dt><dd>{{ stream.conference.session }}</dd>
+ <dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail stream.conference.professor.user.username %}" target="_blank">{{ stream.conference.professor }}</a></dd>
+ <dt>{% trans "Begin" %}</dt><dd>{{ stream.conference.date_begin }}</dd>
+ </dl>
+ </div>
+ </td>
+ <td {% if forloop.counter0 == 0 %}class="border-top"{% endif %} width="10%" align="center">
{% if stream.streaming %}
- <img src="images/media-record.png" alt="yes" style="vertical-align:middle" />
+ <img src="{{ STATIC_URL }}teleforma/images/network-wireless.png" style="vertical-align:middle" title="streaming" />
+ <img src="{{ STATIC_URL }}telemeta/images/media-record.png" style="vertical-align:middle" title="recording" />
{% endif %}
</td>
</tr>
+ <script type="text/javascript">
+ function update_snapshots_callback_{{ stream.course.code }}() {
+ var d = 1;
+ var refresh = function(){
+ $("#snapshot-{{ stream.course.code }}").attr("src","{{ stream.snapshot_url }}");
+ };
+ refresh();
+ setInterval(refresh,d);
+ };
+ update_snapshots_callback_{{ stream.course.code }}();
+ </script>
{% endfor %}
</tbody>
</table>
</div>
+
+
+
{% endif %}
\ No newline at end of file