Reputation: 63
I want to detect the mediaelementjs
full screen event in IE9
. I handle the event by subscribing to "fullscreenchange mozfullscreenchange webkitfullscreenchange". The problem is that clicking the fullscreen button on the video player in IE9
opens in a new popup and no fullscreenchange is fired. Any ideas how to handle this event under IE9
?
Upvotes: 3
Views: 631
Reputation: 63
Mediaelement simulates fullscreen for IE9 with opening the video in a pop up.So no "fullscreenchange" event is fired in IE9.In order to handle the pop up fullscreen we need to extend the "MediaElementPlayer.prototype.enterFullScreen" and MediaElementPlayer.prototype.exitFullScreen" functions.
Sample code:
MediaElementPlayer.prototype.enterFullScreen_org =
MediaElementPlayer.prototype.enterFullScreen;
MediaElementPlayer.prototype.enterFullScreen = function() {
if((/MSIE 9.0/).test(navigator.userAgent)){
// your code here
}
this.enterFullScreen_org();
}
// Same for the .exitFullScreen
Upvotes: 1