-1

I have this m3u8 file: https://iptv-org.github.io/iptv/languages/tur.m3u

This file not standard m3u8 if you open it with NotePad++ or SublimeText you will see. There is list of differences m3u8 and playing next to next. But I don't know how can I implement this m3u8 in ExoPlayer.

Anyone have idea? Thanks.

Nina Gos
  • 11
  • 3
  • Your question is not related to android-studio. anyway idk about android but vlc player in windows is able to play with m3u8, check if there's a version of vlc for android. – Atlas-Pio Apr 08 '22 at 20:27
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Apr 09 '22 at 14:25

2 Answers2

0

This m3u8 is playlist and I parsed it with PHP. There is no way to play in exoplayer. We should parse it first.

Nina Gos
  • 11
  • 3
0

You can play m3u playlist with exoplayer, there is api for that.To play m3u playlist you must create media source with HlsMediaSource.Factory api, like this

private fun buildMediaSource(uri: Uri): MediaSource {
    val dataSourceFactory: DataSource.Factory = DefaultDataSource.Factory(context)
    return HlsMediaSource.Factory(dataSourceFactory).createMediaSource(MediaItem.fromUri(uri))
}

you just need to download your m3u file your self(at least I have not found a way yet, to make exoplayer do that stuff for us), or may be you already have that file - so you can use path to that file as parameter of the function above

Rob
  • 886
  • 9
  • 16