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