The mediaelement.js is a great way to play video. They just have a bug at the end of a videos on internet explorer where the video stays full size, but the window shrinks. Looks a little like this:

MediaElement Close Fullscreen

Not so nice. So the way to fix it is to add a listener that exits full screen when the video is over:

$(function(){
$('audio,video').mediaelementplayer({
success: function(player, node) {
player.addEventListener('ended', function(e){
$('.mejs-unfullscreen button').click();
});
}
});
});

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.