Upstream sync

This commit is contained in:
Senad Uka
2020-09-13 20:09:48 +02:00
parent 3db230de9b
commit 5cf7be6f13
59 changed files with 613 additions and 188 deletions

View File

@@ -24,7 +24,7 @@ $(document).on "turbolinks:load", ->
stream_selected = $("#broadcast_video").data('videoType') == 'stream';
if data.streamer_status == 'recording' && data.status == 'active' && stream_selected
$("#broadcast_video").html data.video_content
$("#live_take").html data.live_take_content
$("#recording_status").html data.recording_status_content
new (Clappr.Player)(
<%= "baseUrl: 'http://cdn.clappr.io/latest'," if Rails.env.test? %>
@@ -37,7 +37,7 @@ $(document).on "turbolinks:load", ->
hlsMinimumDvrSize: 1)
if data.streamer_status == "idle" && data.status == "idle"
$("#broadcast_video").html data.video_content
$("#live_take").html data.live_take_content
$("#recording_status").html data.recording_status_content
showBroadcastRecordings: (data) ->
$(".flash-message").html data.flash_content

View File

@@ -1,4 +1,7 @@
$(document).on("click", "[data-behavior=play_recording]", function() {
clearPlayingHighlight();
$(this).parent().parent().addClass('playing-highlight');
$("#broadcast_video").data('videoType', 'recording');
var playback_url = $(this).attr("data-playback-url")
@@ -14,4 +17,11 @@ $(document).on("click", "[data-behavior=play_recording]", function() {
});
});
$(document).on("click", "[data-behavior=play_stream]", function() { $("#broadcast_video").data('videoType', 'stream'); });
$(document).on("click", "[data-behavior=play_stream]", function() {
// clearPlayingHighlight();
$("#broadcast_video").data('videoType', 'stream');
});
function clearPlayingHighlight() {
$(".playing-highlight").removeClass("playing-highlight");
}