Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | H | 25-Apr-2025 | - | 273 | 131 | |
README.md | H A D | 25-Apr-2025 | 2 KiB | 54 | 36 | |
build.gradle | H A D | 25-Apr-2025 | 1.4 KiB | 37 | 33 |
README.md
1# RTMP DataSource module 2 3This module provides a [DataSource][] implementation for requesting [RTMP][] 4streams using [LibRtmp Client for Android][]. 5 6[DataSource]: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/DataSource.html 7[RTMP]: https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol 8[LibRtmp Client for Android]: https://github.com/ant-media/LibRtmp-Client-for-Android 9 10## License note 11 12Please note that whilst the code in this repository is licensed under 13[Apache 2.0][], using this extension requires depending on LibRtmp Client for 14Android, which is licensed separately. 15 16[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE 17 18## Getting the module 19 20The easiest way to get the module is to add it as a gradle dependency: 21 22```gradle 23implementation 'com.google.android.exoplayer:extension-rtmp:2.X.X' 24``` 25 26where `2.X.X` is the version, which must match the version of the other media 27modules being used. 28 29Alternatively, you can clone this GitHub project and depend on the module 30locally. Instructions for doing this can be found in the [top level README][]. 31 32[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md 33 34## Using the module 35 36Media components request data through `DataSource` instances. These instances 37are obtained from instances of `DataSource.Factory`, which are instantiated and 38injected from application code. 39 40`DefaultDataSource` will automatically use the RTMP extension whenever it's 41available. Hence if your application is using `DefaultDataSource` or 42`DefaultDataSource.Factory`, adding support for RTMP streams is as simple as 43adding a dependency to the RTMP extension as described above. No changes to your 44application code are required. Alternatively, if you know that your application 45doesn't need to handle any other protocols, you can update any 46`DataSource.Factory` instantiations in your application code to use 47`RtmpDataSource.Factory` directly. 48 49## Links 50 51* [Javadoc][] 52 53[Javadoc]: https://exoplayer.dev/doc/reference/index.html 54