-
Notifications
You must be signed in to change notification settings - Fork 1
/
del.min.js
4 lines (4 loc) · 894 Bytes
/
del.min.js
1
2
3
4
function fullscreen(element){if(element.requestFullscreen){element.requestFullscreen();}else if(element.mozRequestFullScreen){element.mozRequestFullScreen();}else if(element.webkitRequestFullscreen){element.webkitRequestFullscreen();}else if(element.msRequestFullscreen){element.msRequestFullscreen();}}
function exitFullscreen(){if(document.exitFullscreen){document.exitFullscreen();}else if(document.mozCancelFullScreen){document.mozCancelFullScreen();}else if(document.webkitExitFullscreen){document.webkitExitFullscreen();}}
function del(videoname,fullscreen,onEnd){window.onload=function(){var player=videojs(videoname,{},function(){if(fullscreen){fullscreen(videoname);}
document.getElementById(videoname).style.display="visible";this.play();this.on('ended',function(){exitFullscreen();document.getElementById(video-name).remove();document.getElementById("end").innerHTML=onEnd;});});};}