2

I'm trying to load/play a video in local server Safari desktop browser v11.0.2, using Phaser.js. The problem is that videos does not even load.

Preloading the video with Phaser loader does not work. I get this error:

Phaser.Loader - video[intro]: error loading asset from URL video/intro.mp4

Displaying the video in HTML:

<video width="320" height="240" controls>
    <source src="video/intro.mp4" type="video/mp4">
</video>

Not working either. Can't see any errors but if I look for the video in the Resources panel I get following message:

An error ocurred trying to load the resource.

Trying to directly access the video from URL but no luck. Getting following error:

Failed to load resource: Plug-in handled load

  • File name is right.
  • File path is right.
  • Video file is not corrupted.
  • Different video files throw the same error.
  • Chrome and Firefox works fine.

Serving files with Python local server

python -m SimpleHTTPServer

has the same problem as serving it with PHP

php -S localhost:8000

If I do upload the files to an nginx public server the problem does not occur. Though I get another error because of playing video without previous user interaction (which is the issue I want to solve in my local).

What can I do?

Mauro Aguilar
  • 1,093
  • 13
  • 22
  • This appears to be a recurring problem - see here, which is really a discussion not an answer: https://stackoverflow.com/a/32998689/334402. Your case is interesting as you are using localhost, I think. Can you share what machine and IOSX version also? Either way, this definitely seems to be and issue with some combinations of Safari and Server - its very odd that OSX is one of the server types causing issues. – Mick Jul 02 '18 at 11:52

0 Answers0