1*30877f79SAndroid Build Coastguard Worker# ExoPlayer HLS module 2*30877f79SAndroid Build Coastguard Worker 3*30877f79SAndroid Build Coastguard WorkerProvides support for HTTP Live Streaming (HLS) content in ExoPlayer. 4*30877f79SAndroid Build Coastguard Worker 5*30877f79SAndroid Build Coastguard Worker## Getting the module 6*30877f79SAndroid Build Coastguard Worker 7*30877f79SAndroid Build Coastguard WorkerThe easiest way to get the module is to add it as a gradle dependency: 8*30877f79SAndroid Build Coastguard Worker 9*30877f79SAndroid Build Coastguard Worker```gradle 10*30877f79SAndroid Build Coastguard Workerimplementation 'com.google.android.exoplayer:exoplayer-hls:2.X.X' 11*30877f79SAndroid Build Coastguard Worker``` 12*30877f79SAndroid Build Coastguard Worker 13*30877f79SAndroid Build Coastguard Workerwhere `2.X.X` is the version, which must match the version of the other media 14*30877f79SAndroid Build Coastguard Workermodules being used. 15*30877f79SAndroid Build Coastguard Worker 16*30877f79SAndroid Build Coastguard WorkerAlternatively, you can clone this GitHub project and depend on the module 17*30877f79SAndroid Build Coastguard Workerlocally. Instructions for doing this can be found in the [top level README][]. 18*30877f79SAndroid Build Coastguard Worker 19*30877f79SAndroid Build Coastguard Worker[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md 20*30877f79SAndroid Build Coastguard Worker 21*30877f79SAndroid Build Coastguard Worker## Using the module 22*30877f79SAndroid Build Coastguard Worker 23*30877f79SAndroid Build Coastguard WorkerAdding a dependency to this module is all that's required to enable playback of 24*30877f79SAndroid Build Coastguard WorkerHLS media items added to `ExoPlayer` in its default configuration. Internally, 25*30877f79SAndroid Build Coastguard Worker`DefaultMediaSourceFactory` will automatically detect the presence of the module 26*30877f79SAndroid Build Coastguard Workerand convert an HLS `MediaItem` into an `HlsMediaSource` for playback. 27*30877f79SAndroid Build Coastguard Worker 28*30877f79SAndroid Build Coastguard WorkerSimilarly, a `DownloadManager` in its default configuration will use 29*30877f79SAndroid Build Coastguard Worker`DefaultDownloaderFactory`, which will automatically detect the presence of 30*30877f79SAndroid Build Coastguard Workerthe module and build `HlsDownloader` instances to download HLS content. 31*30877f79SAndroid Build Coastguard Worker 32*30877f79SAndroid Build Coastguard WorkerFor advanced playback use cases, applications can build `HlsMediaSource` 33*30877f79SAndroid Build Coastguard Workerinstances and pass them directly to the player. For advanced download use cases, 34*30877f79SAndroid Build Coastguard Worker`HlsDownloader` can be used directly. 35*30877f79SAndroid Build Coastguard Worker 36*30877f79SAndroid Build Coastguard Worker## Links 37*30877f79SAndroid Build Coastguard Worker 38*30877f79SAndroid Build Coastguard Worker* [Developer Guide][] 39*30877f79SAndroid Build Coastguard Worker* [Javadoc][] 40*30877f79SAndroid Build Coastguard Worker 41*30877f79SAndroid Build Coastguard Worker[Developer Guide]: https://exoplayer.dev/hls.html 42*30877f79SAndroid Build Coastguard Worker[Javadoc]: https://exoplayer.dev/doc/reference/index.html 43