Tubitv / TubiPlayer

A media streaming video player based on ExoPlayer from google, with convenience methods for ad supported content
MIT License
95 stars 24 forks source link

Remove hard code video format limitation #99

Open allengotstuff opened 5 years ago

allengotstuff commented 5 years ago

Open issue: https://github.com/Tubitv/TubiPlayer/issues/98

Problem:

Currently, we hardcore the MediaModel to only accept .m3u8 format, that puts the limitation of Tubiplayer only accept hls video format.

solution

By removing the hardcode getMediaExtension is MediaModel, the Tubiplayer will automatically create different MediaSource base on url extension.

See below logic for handle automatically MediaSource creation: https://github.com/Tubitv/TubiPlayer/blob/master/lib/src/main/java/com/tubitv/media/activities/TubiPlayerActivity.java#L202