2 Replies Latest reply on May 5, 2016 2:37 AM by andrewj4104571

    HTML5 video playback on Android after back button is used.


      Hi, I am attempting to create an app that plays video inline, using the HTML5 video tag. I need to support Android and have a problem on this platform. My app plays the video inline OK when the app is first launched, but if the app is exited via the back-button, and then re-launched, the video will not play again. I have to 'force stop' the app before it will work again. If I exit the app using the home button, and then re-launch, the video is fine and will playback again OK. This behaviour occurs whether I am playing a remotely hosted video or locally hosted video. The video format is MP4, I have not tried any other format at present. Can anyone tell me what I am doing wrong? I presume the back button needs some kind of reset or clear-up upon exiting the app, but I can't find anything about it!


      I have tried catching and disabling the back button event, but that didn't seem to work at all, possibly because I am using the Ionic framework and am doing it in the wrong place.But at any rate I don't really want to disable it if I can help it.


      I have KeepRunning=false in my config.xml.


      I am currently using PhoneGap Build, CLI 5.2.0, Android 4.1.1, on a Samsung tablet.


      My code (I am disabling the full-screen button via CSS):


      <video id="vidStart" class="videoDisplay" controls="controls" webkit-playsinline>
                      <source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
                      Your browser does not support the video tag.


      Thanks, Andrew