Do not change player while playing in broadcast show page #56

Closed
bilal.catic wants to merge 5 commits from do-not-change-player-while-playing-in-broadcast-show-page into master
2 changed files with 4 additions and 3 deletions
Showing only changes of commit a076edcf8b - Show all commits

View File

@@ -21,7 +21,8 @@ $(document).on "turbolinks:load", ->
refreshBroadcastVideo: (data) ->
$("#broadcast_updates").html data.status_content
if data.streamer_status == 'recording' && data.status == 'active' && !window.recording_selected
stream_selected = $("#broadcast_video").attr('video-type') == 'stream';
if data.streamer_status == 'recording' && data.status == 'active' && stream_selected
$("#broadcast_video").html data.video_content
new (Clappr.Player)(
parentId: '#broadcast_video'

View File

@@ -3,7 +3,7 @@ $(document).on("click", "[data-behavior=play_recording]", function() {
return false;
}
window.recording_selected = true;
$("#broadcast_video").attr('video-type', 'recording');
var playback_url = $(this).attr("data-playback-url")
$("#broadcast_video").empty();
@@ -25,4 +25,4 @@ $(document).on("click", "[data-behavior=play_recording]", function() {
$(this).prepend('<i class="fa fa-check">&nbsp;</i>');
});
$(document).on("click", "[data-behavior=play_stream]", function() { window.recording_selected = false; });
$(document).on("click", "[data-behavior=play_stream]", function() { $("#broadcast_video").attr('video-type', 'stream'); });