how do I monitor the event of exiting full screen after video full screen playback ends?
found some cases on the Internet
listen to the event of video entering and exiting full screen
//
function FullScreen() {
var ele = document.documentElement;
if (ele .requestFullscreen) {
ele .requestFullscreen();
} else if (ele .mozRequestFullScreen) {
ele .mozRequestFullScreen();
} else if (ele .webkitRequestFullScreen) {
ele .webkitRequestFullScreen();
}
}
//
exitFullscreen(elem) {
elem = elem || document;
if (elem.cancelFullScreen) {
elem.cancelFullScreen();
} else if (elem.mozCancelFullScreen) {
elem.mozCancelFullScreen();
} else if (elem.webkitCancelFullScreen) {
elem.webkitCancelFullScreen();
} else if (elem.webkitExitFullScreen) {
elem.webkitExitFullScreen()
}
}
//
$(video).on("ended",function(){
//
exitFullscreen()
});
// webkitbeginfullscreen-webkitendfullscreen
$(video).on("webkitbeginfullscreen", function() {
video.play();
}).on("webkitendfullscreen", function() {
video.pause();
});
above you can see the method of exiting full screen exitFullscreen (), but the trigger does not respond. Google browser ~