iOS can't play video using HTML 5

  • 1
  • Question
  • Updated 4 years ago
  • Doesn't Need an Answer
I'm building phonegap app and I need to play video in it. I know in order to play video on Android, I need to use one of the plugins available, but to play video on iOS, I can use HTML 5 video tag. I have these lines of code:

< video id="video01" width="300" height="300" controls>
< source src="images/test2.mp4" type="video/mp4" />
< /video>

I can see "video box", but I cannot play video for some reason. In console I don't see any errors.

Video I'm using is from this page: http://www.quirksmode.org/html5/tests...

And in iPhone Safari I can load MP4 version from that page without any problems.
Photo of Nikola Mratinić

Nikola Mratinić

  • 3 Posts
  • 0 Reply Likes
  • confused

Posted 5 years ago

  • 1
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hi Nikola

It could be video URI issue or video format. I'm using similar code below and it works
https://github.com/amirudin/PhoneGapPluginDemo/blob/master/www/html5-video.html
(Edited)
Photo of Nikola Mratinić

Nikola Mratinić

  • 3 Posts
  • 0 Reply Likes
I have one more question, is it possible then to play video on iOS using HTML 5 which is stored locally ?
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
Hi Nikola,

Yes, this works.

-yiming
Photo of Nikola Mratinić

Nikola Mratinić

  • 3 Posts
  • 0 Reply Likes
Thanks :)
Photo of Vishal Verma

Vishal Verma

  • 1 Post
  • 0 Reply Likes
You can try using chrome browser
iOS Apps