I have a basic HTML5 player without such controls ...
<video id="videoPlayer" preload="auto" webkit-playsinline> <source id="videoSourceMP4" src="" type="video/mp4" /> <source id="videoSourceOGG" src="" type="video/ogg" /> </video>
At the top there is a button that, when pressed, loads the desired video:
document.getElementById("videoSourceMP4").src = "videos/video.mp4"; document.getElementById("videoSourceOGG").src = "videos/video.ogg"; document.getElementById("videoPlayer").load();
Now I am also starting to check if the video can play and start playing using:
document.getElementById("videoPlayer").oncanplaythrough = function(){ document.getElementById("videoPlayer").play(); }
This worked in ios8, however, nothing has happened since ios9. The video is stuck in the first frame and does not play. Even if I add another button at the top using the play () function, nothing will happen. I need to turn on the controls and play it using the play button. If I paused the video and then press my own play button, this will work. I want to be able to use my own controls.
Does anyone know why this is being done now?
source share