What is the correct way to play a movie on ios?


#1

I want to play a movie on ipad ,I find sometimes the autoplay or play( or load) method on ios can’t work, I don’t know why, so I think I need to add a button to play ,but it doesn’t work also.I use the promise (when I play()) to catch the error and it shows "The operation is not supported ".
Is there someone having the same problem before ?
I need your help ,thanks


#2

When I find the the movie can’t be played in some ios platform( I have tried serveral ways) , I use the css element to play the gif instead,and it works well :joy:


#3

Try this @MasterT It shows videos in textures but might help a bit https://developer.playcanvas.com/en/tutorials/video-textures/


#4

I have tried this way and others ,thank you:joy:


#5

There are some restrictions on iOS about video playback. Videos can’t be auto played with sound and/or they can only be played from user event such as touching the screen.


#6

Yes. It may also be necessary to mute the audio before autoplay will work. That may be browser dependent.


#7

thank all of you ,I will try your advise