2020-06-30 05:07:43 +02:00
|
|
|
$(document).on("click", "[data-behavior=play_recording]", function() {
|
|
|
|
|
if ($(this).hasClass('active')){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-27 10:17:56 +00:00
|
|
|
$("#broadcast_video").data('videoType', 'recording');
|
2020-06-30 05:07:43 +02:00
|
|
|
|
|
|
|
|
var playback_url = $(this).attr("data-playback-url")
|
|
|
|
|
$("#broadcast_video").empty();
|
|
|
|
|
|
|
|
|
|
new Clappr.Player({
|
|
|
|
|
<%= "baseUrl: 'http://cdn.clappr.io/latest'," if Rails.env.test? %>
|
|
|
|
|
parentId: '#broadcast_video',
|
|
|
|
|
source: playback_url,
|
|
|
|
|
width: '100%',
|
|
|
|
|
height: '100%',
|
|
|
|
|
autoPlay: true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".dropdown-menu").children().removeClass('active');
|
|
|
|
|
$(".dropdown-menu").children().children('i').remove();
|
|
|
|
|
$(this).siblings().removeClass('active');
|
|
|
|
|
$(this).siblings().children("i").remove();
|
|
|
|
|
$(this).addClass('active');
|
|
|
|
|
$(this).prepend('<i class="fa fa-check"> </i>');
|
2020-07-20 13:28:40 +00:00
|
|
|
});
|
|
|
|
|
|
2020-07-27 10:17:56 +00:00
|
|
|
$(document).on("click", "[data-behavior=play_stream]", function() { $("#broadcast_video").data('videoType', 'stream'); });
|