Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1269014

    on Safari that trigger class: av-mediajs-loaded isn’t set ( on mediaelementwrapper video) . So f.e. alot of custom scripts like the mute/unmute button for html5 videos do not work anymore.
    Because of:

    $('.avia_video').on('av-mediajs-loaded', function() {
    … 

    But I seem to remember that these also worked with Safari.
    So something must have changed. How could I still hook up a script with the full loading of the self hosted video.

    PS: that page is still on WP5.5.3 not on 5.6

    Is it because the media event “canplay” is not fired on Safari ?

    #1270085

    Hey Guenter,

    Thank you for the inquiry.

    Have you tried checking for the av-mediajs-loaded class attribute instead of waiting for the event? You could maybe use the useInterval function to check for the class name and only execute the custom script once the class name is found.

    Best regards,
    Ismael

    #1270462

    avia.js line 497ff – that is the way the class is added – and is in dependency to the event canplay – isn’t it?

    setTimeout(function()
    {
    	if (mediaElement.pluginType == 'flash') 
    	{	
    		mediaElement.addEventListener('canplay', function() { fv.trigger('av-mediajs-loaded'); }, false);
    	}
    	else
    	{
            fv.trigger('av-mediajs-loaded').addClass('av-mediajs-loaded');
    	}

    the class does not exist in Safari Browsers

    but on safari this does not happen – and this: https://webers-testseite.de/mute-unmute-video-slide/ leads to that error mentioned here: https://kriesi.at/support/topic/adding-button-to-mute-unmute-audio-on-fullscreen-background-video-2/#post-1268456

    #1270787

    Hi,

    Looks like this is a common issue with Safari browsers, and according to other forums, we could use or wait for the loadedmetadata instead.

    // https://stackoverflow.com/questions/50051639/javascript-html5-video-event-canplay-not-firing-on-safari
    // https://github.com/video-dev/hls.js/issues/1686

    Best regards,
    Ismael

    #1270806

    i tried allready “loadedmetadata” – without any effort

    #1271470

    Hi,

    When checking in safari, when you console.log anything in the setTimeout function or within the ifelse statement, do you see the result? Older IE browsers, version 10 or older, usually return the same errors or display the same problems as Safari browsers, but we could not reproduce the same issue. The mute/unmute works fine on IE11 and on IE10/IE9 emulation.

    We will forward the issue to our channel.

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.