Compare commits
2 Commits
change-big
...
fix-stream
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fe1dadaf2 | ||
|
|
c6c10587c8 |
@@ -21,10 +21,11 @@ $(document).on "turbolinks:load", ->
|
||||
|
||||
refreshBroadcastVideo: (data) ->
|
||||
$("#broadcast_updates").html data.status_content
|
||||
stream_selected = $("#broadcast_video").attr('video-type') == 'stream';
|
||||
stream_selected = $("#broadcast_video").data('videoType') == 'stream';
|
||||
if data.streamer_status == 'recording' && data.status == 'active' && stream_selected
|
||||
$("#broadcast_video").html data.video_content
|
||||
new (Clappr.Player)(
|
||||
<%= "baseUrl: 'http://cdn.clappr.io/latest'," if Rails.env.test? %>
|
||||
parentId: '#broadcast_video'
|
||||
source: data.full_live_stream_playback_url
|
||||
width: '100%',
|
||||
@@ -3,7 +3,7 @@ $(document).on("click", "[data-behavior=play_recording]", function() {
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#broadcast_video").attr('video-type', 'recording');
|
||||
$("#broadcast_video").data('videoType', '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"> </i>');
|
||||
});
|
||||
|
||||
$(document).on("click", "[data-behavior=play_stream]", function() { $("#broadcast_video").attr('video-type', 'stream'); });
|
||||
$(document).on("click", "[data-behavior=play_stream]", function() { $("#broadcast_video").data('videoType', 'stream'); });
|
||||
@@ -1,7 +1,7 @@
|
||||
<% if broadcast.streamer_recording? && broadcast.active? %>
|
||||
<div id="broadcast_video" class="embed-responsive-item"></div>
|
||||
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream"></div>
|
||||
<% else %>
|
||||
<div id="broadcast_video" class="embed-responsive-item">
|
||||
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream">
|
||||
<table class="w-100 h-100 bg-secondary">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
@@ -93,7 +93,7 @@ feature 'User managing broadcasts' do
|
||||
BroadcastsChannel.broadcast_stream_updates(broadcast)
|
||||
|
||||
expect(page).to have_content stream_begun_message
|
||||
expect(page).to have_selector('div#broadcast_video', count: 1)
|
||||
expect(page).to have_selector('div#broadcast_video', count: 2)
|
||||
|
||||
broadcast.streamer_status = :idle
|
||||
broadcast.status = :idle
|
||||
|
||||
Reference in New Issue
Block a user