How can I use ExoPlayer library to stream m3u8 files and play it on Android TV. I just want to build a basic Video Player to play m3u8 files on Android TV.
The library I am using is this : ExoPlayer
How can I use ExoPlayer library to stream m3u8 files and play it on Android TV. I just want to build a basic Video Player to play m3u8 files on Android TV.
The library I am using is this : ExoPlayer
Use the emVideoView.setVideoURI from the ExoMedia Sample
private VideoView videoView;
private void setupVideoView() {
// Make sure to use the correct VideoView import
videoView = (VideoView)findViewById(R.id.video_view);
videoView.setOnPreparedListener(this);
//For now we just picked an arbitrary item to play
videoView.setVideoURI(Uri.parse("https://archive.org/download/Popeye_forPresident/Popeye_forPresident_512kb.mp4"));
}
@Override
public void onPrepared() {
//Starts the video playback as soon as it is ready
videoView.start();
}
Additional reference, SO post.