[TIMOB-23426] Android - Support for MPEG-DASH using ExoPlayer
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, exoplayer, hyperloop, media, streaming |
Reporter | Ygor Lemos |
Assignee | Unknown |
Created | 2016-05-23T20:00:23.000+0000 |
Updated | 2020-02-26T12:43:25.000+0000 |
Description
Currently if we need to stream long movies using adaptive streaming, we can only do so on iOS using Titanium since HLS is natively enabled on Apple's native media player (MPMoviePlayer).
In order to support adaptive streaming on Android, we need to use the new official ExoPlayer framework, which supports MPEG-DASH, replacing the old MediaPlayer implementation.
This also brings a lot of benefits apart from MPEG-DASH adaptive streaming. According to the ExoPlayer documentation:
* Support for Dynamic Adaptive Streaming over HTTP (DASH) and SmoothStreaming, neither of which are are supported by MediaPlayer (it also supports HTTP Live Streaming (HLS), FMP4, MP4, M4A, MKV, WebM, MP3, AAC, MPEG-TS, MPEG-PS, OGG, FLV and WAV).
* Support for advanced HLS features, such as correct handling of #EXT-X-DISCONTINUITY tags.
The ability to customize and extend the player to suit your use case. ExoPlayer is designed specifically with this in mind, and allows many components to be replaced with custom implementations.
* Easily update the player along with your application. Because ExoPlayer is a library that you include in your application apk, you have control over which version you use and you can easily update to a newer version as part of a regular application update.
* Fewer device specific issues.
Links referring to ExoPlayer and MPEG-DASH:
* http://google.github.io/ExoPlayer/
* https://developer.android.com/guide/topics/media/exoplayer.html
* https://github.com/google/ExoPlayer
* https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP
+1
+1
https://github.com/NetrisTV/ti.exoplayer
I tried using NetrisTV ti.exoplayer but never got it to work. Probably due to not getting the right dependencies or not knowing how to use them. This really does need to be native in Appcelerator's MediaPlayer API, particularly for reliably playing AAC streams (like Shoutcast or Icecast) on Android.
All dependencies are included and all stream from demo playlist should work (app example is in "android/example" directory). If you have questions about NetrisTV/ti.exoplayer feel free to ask them on github.