Search code examples
javascriptioshtmlipadvideo.js

VideoJS: not working on IOS


I used the videojs and it is working fine all browsers(including IE) and on Android . But it is not working on IOS devices (iphone and ipad IOS version 6).

Here is the code which I am using to add the video to the page.

<video id="video1" class="video-js vjs-default-skin" width="276" height="153" controls="" preload="auto" data-setup="{}">
<source src=myvideo.mp4 type="video/m4v" >
</video>    

I have spent ages and could not find any solution. I m using video.js Version 3.2.0 and getting the loading spinner forever. I tried using version 4 and just black screen comes up.

Any Help please.


Solution

  • First put double quotes around the source src attribute and try that. If that doesn't solve it, it sounds like the problem is with the mp4 itself, most likely because of the way it's been encoded or it has a huge filesize. Try using videojs's default movie (http://vjs.zencdn.net/v/oceans.mp4) and see if that works. If it works, you know the problem lies with the movie file itself.