I am using mediaelement.js, the player is working as intended with chrome but for firefox the events are not firing. Are there any specific events that don't work on firefox? Which events are available?
I have tried both the loadeddata and progress events, but neither are getting called in firefox.
player.addEventListener('loadeddata', function() {
jQuery('.mejs-overlay-button').trigger('click');
}, false);
Are you adding the events inside the success function of your mediaelementplayer() function?
(function($) {
$(document).ready(function() {
$('video').mediaelementplayer({
success: function (mediaElement, domObject) {
//add events here
mediaElement.addEventListener('loadeddata', function() {
console.log('loadeddata');
});
//timeupdate event
mediaElement.addEventListener('timeupdate', function(e) {
console.log(mediaElement.currentTime);
});
}
});
});
})(jQuery);