Improve streaming

Replace hard-coded URL on dashboard.
Fix styling of room selector on streaming page.
This commit is contained in:
Joel Addison 2024-04-16 22:14:20 +10:00
parent ebaeedb076
commit 05f324dff7
4 changed files with 10 additions and 7 deletions

View file

@ -3,6 +3,6 @@ from pinaxcon.streaming import views
urlpatterns = [
url(r"^$", views.streaming_view, name="streaming-home"),
url(r'^feeds$', views.streaming_feeds, name="streaming-feeds"),
url(r"^$", views.streaming_view, name="streaming_home"),
url(r'^feeds$', views.streaming_feeds, name="streaming_feeds"),
]

View file

@ -8,14 +8,14 @@
{% block content %}
<p>Live Streaming is available to everyone attending the conference.</p>
<p>We encourage you to join in the chat via the <a href="https://matrix.to/#/#everything-open:matrix.org" target="_blank">Everything Open Matrix Space</a></p>
<p>We encourage you to join in the chat via the <a href="https://matrix.to/#/#everything-open:matrix.org" target="_blank">Everything Open Matrix Space</a>.</p>
<div id="holding-frame">
<p>There are currently no live streams available. Please check back soon.</p>
</div>
<div id="rooms-frame">
<h2>Available Rooms</h2>
<ul class="nav nav-tabs room-buttons">
<ul class="nav nav-pills room-buttons">
</ul>
</div>
<div id="streaming-frame">

View file

@ -63,7 +63,7 @@
<h3>Join the Conference</h3>
<p>The conference stream is now open. Please join us to watch talks.</p>
<div>
<a class="btn btn-lg btn-primary" role="button" href="/streaming">Launch Conference</a>
<a class="btn btn-lg btn-primary" role="button" href="{% url "streaming_home" %}">Launch Conference</a>
</div>
</div>
</div>

View file

@ -83,11 +83,13 @@ $(function() {
for (var i = 0; i < streams.length; ++i) {
var availableStream = streams[i];
let streamButton = $('<li role="presentation"><a href="#" data-stream-id="' + availableStream.stream_id + '">' + availableStream.room_name + '</a></li>')
let streamItem = $('<li class="nav-item"></li>')
let streamButton = $('<a class="nav-link" href="#' + availableStream.stream_id + '" data-stream-id="' + availableStream.stream_id + '">' + availableStream.room_name + '</a>')
if (availableStream.stream_id === selectedStream.id) {
streamButton.addClass('active');
}
rooms.append(streamButton);
streamItem.append(streamButton);
rooms.append(streamItem);
}
$('ul.room-buttons > li > a').on('click', switch_room);
@ -98,6 +100,7 @@ $(function() {
let activeRooms = $('.room-buttons .active');
activeRooms = activeRooms.removeClass('active');
roomButton.addClass('active');
let streamId = roomButton.data('streamId');
let stream = null;