Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a47c69f36d | ||
|
|
51d56dc9ac |
@@ -1,4 +1,6 @@
|
||||
$(document).on("click", "[data-behavior=play_recording]", function() {
|
||||
$("#raw-video-embed").remove();
|
||||
|
||||
clearPlayingHighlight();
|
||||
$(this).parent().parent().addClass('playing-highlight');
|
||||
|
||||
@@ -18,7 +20,6 @@ $(document).on("click", "[data-behavior=play_recording]", function() {
|
||||
});
|
||||
|
||||
$(document).on("click", "[data-behavior=play_stream]", function() {
|
||||
// clearPlayingHighlight();
|
||||
$("#broadcast_video").data('videoType', 'stream');
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<% if broadcast.director_mode_video_embed.present? && params[:non_director_mode].nil? %>
|
||||
<div id="director_broadcast_video" class="embed-responsive-item" data-video-type="stream">
|
||||
<%= raw broadcast.director_mode_video_embed %>
|
||||
<div id="broadcast_video" class="embed-responsive-item" data-video-type="strean"></div>
|
||||
<div id="raw-video-embed"><%= raw broadcast.director_mode_video_embed %></div>
|
||||
</div>
|
||||
<% elsif broadcast.streamer_recording? && broadcast.active? %>
|
||||
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream"></div>
|
||||
|
||||
@@ -204,12 +204,31 @@ feature 'User managing broadcasts' do
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
expect(page).not_to have_selector('#broadcast_video')
|
||||
expect(page).to have_selector('#raw-video-embed')
|
||||
expect(page).to have_selector('#director_broadcast_video')
|
||||
|
||||
expect(page).to have_selector('#director_mode_switch')
|
||||
end
|
||||
|
||||
scenario 'playing recordings is possible in director mode', js: true do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project, director_mode_video_embed: 'director_mode')
|
||||
create(:broadcast_recording, broadcast: broadcast, asset_uid: "asset_uid_1")
|
||||
create(:broadcast_recording, broadcast: broadcast, asset_uid: "asset_uid_2")
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
expect(page).to have_selector('#raw-video-embed')
|
||||
expect(page).to have_selector('#broadcast_video')
|
||||
|
||||
broadcast_video_div = find('#broadcast_video')
|
||||
expect(broadcast_video_div.all('*').length).to eq 0
|
||||
|
||||
first("[data-behavior='play_recording']").click
|
||||
|
||||
expect(page).not_to have_selector('#raw-video-embed')
|
||||
expect(broadcast_video_div.all('*').length).to be > 2
|
||||
end
|
||||
|
||||
context 'When the user is associate' do
|
||||
let(:current_user) { create(:user, :associate) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user