Tubitv / TubiPlayer

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

Is there a way to play mp4, mkv files ? #98

Open HazimSharif opened 5 years ago

HazimSharif commented 5 years ago

Hello,

The player works fine with m3u files, Is there a way to play Mp4 and MKV files ?

Thank you

allengotstuff commented 5 years ago

Hi HazimSharif

https://github.com/Tubitv/TubiPlayer/pull/99 This PR will fix the issue, and you can just pass the mp4 or mkv url into MediaModel when start the Activity, and Tubiplayer can play them automatically.

String subs = "http://put_your_own_subtitle.srt";
String artwork = "http://www.put_your_own_art_work.png";
String name = "Example Video";
String video_url = "http://put_your_own_video_url.mp4";
Intent intent = new Intent(SelectionActivity.this,
                            DoubleViewTubiPlayerActivity.class);
intent.putExtra(TubiPlayerActivity.TUBI_MEDIA_KEY,
                    MediaModel.video(name, video_url, artwork, null));
startActivity(intent);