I really need to show an introduction video in my app on ios & android, but I haven’t been able to get it working properly.
Closest I’ve come is by using the Android Html5Video plugin for cordova, but I’m still getting sound only.
First I thought maybe hardware acceleration was disabled, but AndroidManifest already had android:hardwareAccelerated="true" by default.
Does anyone know why html5 video isn’t being displayed on Android? Are there other ways to show video?
When I tried Crosswalk yesterday I ran into an unsolved issue on Samsung phones that caused the bottom portion of the page to look glitched (see https://crosswalk-project.org/jira/browse/XWALK-3284). I also had problems with the app freezing Android completely on either the first page or after transitioning to the second page. I’m not sure Crosswalk is ready yet for production.
Also, Crosswalk is Android only, right? I’d like a solution that works on ios as well.
Ok, so it turns out that html5 video in my app does work on a newer phone (one plus), same android version (4.4.4)! However, I do need to support older models as well (including Samsung s2).
Next thing I tried was the crosswalk browser with ionic browser add crosswalk. It worked, video was now visible… but the app completely froze my phone after that. So I guess crosswalk is still not an option for me.
Edit: Ok that plugin works, but it shows the user a dialog for what program to use instead of immediately playing the video, so I’m still looking for a better solution.
I have a similar issue here. First I wasn’t able to get the video playing at all, then after switching to the html5Video plugin, I managed to get the sound working but still no video.
I tested this on a Galaxy S4 on CM12, with the latest Crosswalk build added to the project.
One clue is that it is said in another post that [quote=“datawaslost, post:5, topic:10096”]
iOS will recognize an MP4 file as a video without the proper content-type, but not Android.
[/quote]
So I tried to specify a type=“video/mp4” on the video element, with no luck. Plus I can see from the network tab in ChromeDev that the content is still read as an “Application/Octet-stream” …
When I try this with 4.4.4 it will not play the video. In the network tab of the developer tools I see the GET request for the video was canceled. To verify that the file was accessible, I added a link to the video file that opened the video in the device video player (but only the audio plays. When I go to full screen I see the video and hear the audio.)
I am storing my videos here: file:///data/data/appname/files/video/4292658792001.mp4
also tried here: file:///data/data/appname/raw/4292658792001.mp4
Using Genymotion to emulate the different OS versions.