Video Scene7 Player
by raviteja gunda
JavaScript
(function($) {
'use strict';
$('document').ready(function() {
var $videoBtn = $('.play-btn');
var $video = $('video');
$videoBtn.each(function(index, element) {
element.addEventListener('click', function(event) {
var s7videoviewer = new s7viewers.VideoViewer({
"containerId": "s7video_div",
"params": {
"serverurl": $(this).attr('data-scene7domain') + "is/image/",
"contenturl": $(this).attr('data-scene7domain') + "/is/content/",
//"config": "questdiagnostics/Video",
"posterimage": $(this).attr('data-posterimage'),
"videoserverurl": $(this).attr('data-scene7domain') + "is/content",
"asset": $(this).attr('data-asset')
}
});
s7videoviewer.init();
$("#s7video_div").show();
});
});
$(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange',
function() {
$video.each(function(index, element) {
element.pause();
});
}
);
});
})($);