问题
I have an index.html
with an iframe
and inside that iframe
I have the following code:
<a id="watch-live-btn" href="http://the.location.to/playlist.m3u8" target="_parent"></a>
The video plays fine on iOS and when I hit "Done" I'm sent back to the app with no problems. When I try this on Android it just sits there for some time doing nothing. The app is still active in the mean time.
iOS: 6.1 Android 4.0.4
回答1:
You can make use of a phonegap plugin. There is one already created here for playing videos:
https://github.com/macdonst/VideoPlayer
If you want to stream on android pre 3.0 you can modify the plugin to use the Vitamio library as well:
http://www.vitamio.org/en/Download/
来源:https://stackoverflow.com/questions/16949510/phonegap-play-m3u8-video