MP4 videos not loading on Safari

I’ve got an MP4 that will not play on Safari if I go through the standard WordPress URL (https://s***s.com/ediagnostic/files/2019/03/evideo.mp4), I get this error in the console:

Failed to load resource: Plug-in handled load

But if I use a direct path it’s fine (https://s***s.com//wp-content/blogs.dir/90/files/2019/03/evideo.mp4).

The second link works – they both link to the same file, but the first one uses the standard WP link, the second goes directly to the file.

  • Sandor
    • The Incredible Code Injector

    Hi Ash,

    Thank you for jumping in – but I really hope that someone else is working on this?

    This ticket was created by WPMUDEV support staff after being unable to solve the issue – included should be server info to look further.

    In reading the issue you’ll see the exact same file works when using a different URL – so the issue is not the encoding or the server. It’s something specific to how wordpress is serving the file.

    Cheers,

    -Sandor

  • Nithin Ramdas
    • Support Wizard

    Hi Sandor,

    This ticket was created by WPMUDEV support staff after being unable to solve the issue – included should be server info to look further.

    In reading the issue you’ll see the exact same file works when using a different URL – so the issue is not the encoding or the server. It’s something specific to how wordpress is serving the file.

    Yes, this ticket was escalated from the live chat, as mentioned in the previous reply, could you please double check with your hosting provider about the type of the server where the video files are saved? Whether it’s Blob server? etc

    I’m afraid, accessing the site via FTP doesn’t help much in determining this. As mentioned in the following link, such issues are quite common in Blob servers, and there isn’t much workaround in such use case.

    https://stackoverflow.com/questions/18103103/failed-to-load-resource-plugin-handled-load-on-ios

    If you can confirm it isn’t a Blob server, then there are many possibilities for such an issue to occur. It could also arise due to conflicts on the website side too.

    Are you comfortable with us deactivating all the plugins in your system just to ensure whether it makes any difference in how the videos loads in Safari?

    Please do provide further details, so that we could give a closer look, if needed. Have a nice day ahead. :slight_smile:

    Regards,

    Nithin

  • Sandor
    • The Incredible Code Injector

    Hi Nithin,

    So happy someone is on this!

    This is an Apache/WHM/cPanel server hosted with a google cloud instance.

    There is no external file server or BLOB server being used.

    As mentioned previously – the exact same file is served from the server with no issues if you don’t use the WordPress generated URL. I think that should rule-out the problem being a BLOB server or such as it would not work at all if that was the case?

    You may deactivate plugins to troubleshoot this.

    Thanks,

    -Sandor

  • Ash
    • Code Norris

    Hello Sandor

    To be honest, I have tried on many possible ways, even I have created a new test page but still could not run the video on Safari.

    According to chat note, no conflict test was done. Would you please run a conflict test? I could run it but I need to deactivate network activated plugins too. So, better you run the test when you have very low number of visitors on your site.

    I also recommend to change the htaccess to the default htaccess while you do the conflict test. Also, try with default theme as well.

    Let us know how it goes.

    Cheers

    Ash

  • Kostas
    • CTO

    Hi Sandor ,

    This is a confirmed WordPress issue as seen on https://core.trac.wordpress.org/ticket/42560 but the fix hasn’t yet been implemented since it’s a deprecated functionality basically.

    To explain a little bit better your multisite is using the “older” filesystem/code that WordPress had before it’s 3.5 ( the blogs.dir instead of /uploads/sites ) release so most of that code isn’t used anymore and most likely not “actively” maintained.

    I’ve made some changes in the /wp-includes/ms-files.php file where I’ve applied a patch that fixes this issue and you will also find an ms-files_orig.php which is the original unchanged code as well if you’d like to “revert” back to it. The only other way would be to host the videos in a 3rd party server as it seems for the time being i.e. youtube etc if you don’t want to have core files changed.

    You can keep the zip that is attached to this topic as a backup as when you update WordPress these changes will be lost as well. I’ll be also informing the Core team that the issue still exists + that the patch still fixes it just in case it can make it into a release :slight_smile: in the future. The code changes can be also found at https://core.trac.wordpress.org/attachment/ticket/42560/ms-files.diff .

    The video works fine now on Safari according to my tests but please do check it out as well and tell me if you can confirm also.

    Tell me if you need any further help with this.

    Regards,

    Konstantinos

  • Sandor
    • The Incredible Code Injector

    Konstantinos,

    Thank you very much – it does seem to be working, the video is playing just fine in Safari now.

    I had a new issue with uploading something in the media section of the site but worked around it – I haven’t had a chance to troubleshoot and see if it’s related or just coincidental timing. Either way you clearly figured the problem.

    Thanks again,

    -Sandor

    • Kostas
      • CTO

      No problem at all Sandor , I’m glad I could help.

      Unfortunately ( and this is why I want to mention it again ) as I’ve said this is a change to a core WordPress file that I’m not sure if it will ever actually be updated to support this so you’ll have to keep an eye and keep the code changes re-applied whenever you get a WordPress update as well. An easy test would simply be to see if the videos are playing after a core update, if not, re-apply the customized file and it should be good to go :slight_smile: .

      Regards,

      Konstantinos

  • Kaiberie
    • Site Builder, Child of Zeus

    I actually found a solution to this and wrote a tutorial. But it’s Gzip that’s doing it, apparently. DIsable Gzip, and 99% of the time it works.
    The tutorial went live about 10 mins ago, but is a bit rambly, cause I’m not used to writing them for techies, and there’s a tone I use on my blog (and I’m dying of a migraine, so I’m stuck with it), but I hope it helps!
    Media error – probably Gzip (or at least, it makes it work again) – Kaiberie – WPmuDev forum

    Kai