I have a question about video playback.
I want to play videos inside html using a video tag within the app created by Cordova.
Works with Android 5.0, but cannot play with WebView with Android 4.4.2.
The video can only be played up to 100 seconds.
/data/data/<app-id>/files/
I placed the file below, where I was playing the video, but I could only play it for 100 seconds.
Since video access was a file protocol, I started a web server inside Android using the cordova.httpd plug-in to access the video using the http protocol.
At the same time, the file protocol cannot access the http protocol, so I used the inappbrowser plug-in to launch a separate window and display HTML for video playback inside it.
http://192.168.2.1:8080/sample/sample.html
can be accessed as .
Here's the question.
If the Android device is connected to wifi (online), all videos will be played.
If it is not connected to wifi, it can only be played up to 100 seconds like above.
Offline
http://127.0.0.1:8080/sample/sample.html
access the .
You can use Chrome's adb extension to debug the connected Android Web View, so when I followed the log, the video file loading was displayed as (pending)
.
[Purpose] I wish I could achieve it, so I don't care how to do it, but is there any way to load the video or play the video?
From questioner silvermotto's comment.
I was able to do this by starting another activity in Crosswalk and replacing inappbrowser.
© 2024 OneMinuteCode. All rights reserved.