I use a lot of videos within my game and my deployment targets are android and iOS. With android, I have barely problems using videos, but apple besides, is a mess like always.
It took a long time for me to figure out the actual problem: “An error occured trying to load the resource” (when loading pack.json, I gues actually I load the video here, but as it is referenced in the pack.json…) says the network tab of the web inspector within safari. But: Phaser does not throw specific errors.
For the format I already tried .mp4 and .webm, the result is the same: A black screen. However, when I specify a video directly like this
<video autoplay muted playsinline> <source src="my/path/to/video.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video>
then it works for iOS < 11, for iOS >=11 it still shows a black screen.
Do you guys know of any solution to make it working for iOS >= 8?
I tried setting asBlob within the Phaser Editor, but it didn’t work.
Somehow it seems like iOS is expecting another encoding or something like that? Help me out of the Apple hell