README updates for MediaSource, DataSource and UI modules
PiperOrigin-RevId: 401793145
This commit is contained in:
parent
e4a5c07b5f
commit
e160649d9c
@ -1,15 +1,13 @@
|
|||||||
# ExoPlayer Cronet extension
|
# Cronet DataSource module
|
||||||
|
|
||||||
The Cronet extension is an [HttpDataSource][] implementation that uses
|
This module provides an [HttpDataSource][] implementation that uses [Cronet][].
|
||||||
[Cronet][].
|
|
||||||
|
|
||||||
Cronet is the Chromium network stack made available to Android apps as a
|
Cronet is the Chromium network stack made available to Android apps as a
|
||||||
library. It takes advantage of multiple technologies that reduce the latency and
|
library. It takes advantage of multiple technologies that reduce the latency and
|
||||||
increase the throughput of the network requests that your app needs to work,
|
increase the throughput of the network requests that your app needs to work. It
|
||||||
including those made by ExoPlayer. It natively supports the HTTP, HTTP/2, and
|
natively supports the HTTP, HTTP/2, and HTTP/3 over QUIC protocols. Cronet is
|
||||||
HTTP/3 over QUIC protocols. Cronet is used by some of the world's biggest
|
used by some of the world's biggest streaming applications, including YouTube,
|
||||||
streaming applications, including YouTube, and is our recommended network stack
|
and is our recommended network stack for most use cases.
|
||||||
for most use cases.
|
|
||||||
|
|
||||||
[HttpDataSource]: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.html
|
[HttpDataSource]: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.html
|
||||||
[Cronet]: https://developer.android.com/guide/topics/connectivity/cronet
|
[Cronet]: https://developer.android.com/guide/topics/connectivity/cronet
|
||||||
@ -32,8 +30,8 @@ locally. Instructions for doing this can be found in the [top level README][].
|
|||||||
|
|
||||||
## Using the module
|
## Using the module
|
||||||
|
|
||||||
ExoPlayer requests data through `DataSource` instances. These instances are
|
Media components request data through `DataSource` instances. These instances
|
||||||
obtained from instances of `DataSource.Factory`, which are instantiated and
|
are obtained from instances of `DataSource.Factory`, which are instantiated and
|
||||||
injected from application code.
|
injected from application code.
|
||||||
|
|
||||||
If your application only needs to play http(s) content, using the Cronet
|
If your application only needs to play http(s) content, using the Cronet
|
||||||
@ -57,10 +55,10 @@ instance.
|
|||||||
|
|
||||||
#### Google Play Services
|
#### Google Play Services
|
||||||
|
|
||||||
By default, ExoPlayer's Cronet extension depends on
|
By default, this module depends on
|
||||||
`com.google.android.gms:play-services-cronet`, which loads an implementation of
|
`com.google.android.gms:play-services-cronet`, which loads an implementation of
|
||||||
Cronet from Google Play Services. When Google Play Services is available,
|
Cronet from Google Play Services. When Google Play Services is available, this
|
||||||
this approach is beneficial because:
|
approach is beneficial because:
|
||||||
|
|
||||||
* The increase in application size is negligible.
|
* The increase in application size is negligible.
|
||||||
* The implementation is updated automatically by Google Play Services.
|
* The implementation is updated automatically by Google Play Services.
|
||||||
@ -87,14 +85,14 @@ use of Cronet Embedded may be appropriate if:
|
|||||||
|
|
||||||
There's also a fallback implementation of Cronet, which uses Android's default
|
There's also a fallback implementation of Cronet, which uses Android's default
|
||||||
network stack under the hood. It can be used by adding a dependency on
|
network stack under the hood. It can be used by adding a dependency on
|
||||||
`org.chromium.net:cronet-fallback`. This implementation should _not_ be used
|
`org.chromium.net:cronet-fallback`. This implementation should *not* be used
|
||||||
with ExoPlayer, since it's more efficient to use `DefaultHttpDataSource`
|
with `CronetDataSource`, since it's more efficient to use
|
||||||
directly in this case.
|
`DefaultHttpDataSource` directly in this case.
|
||||||
|
|
||||||
When using Cronet Fallback for other networking in your application, use the
|
When using Cronet Fallback for other networking in your application, use the
|
||||||
more advanced approach to instantiating a `CronetEngine` described below so that
|
more advanced approach to instantiating a `CronetEngine` described below so that
|
||||||
you know when your application's `CronetEngine` has been obtained from the
|
you know when your application's `CronetEngine` has been obtained from the
|
||||||
fallback implementation. In this case, avoid using it with ExoPlayer and use
|
fallback implementation. In this case, avoid `CronetDataSource` and use
|
||||||
`DefaultHttpDataSource` instead.
|
`DefaultHttpDataSource` instead.
|
||||||
|
|
||||||
### CronetEngine instantiation
|
### CronetEngine instantiation
|
||||||
@ -115,8 +113,9 @@ This makes it possible to iterate through the providers in your own order of
|
|||||||
preference, trying to build a `CronetEngine` from each in turn using
|
preference, trying to build a `CronetEngine` from each in turn using
|
||||||
`CronetProvider.createBuilder()` until one has been successfully created. This
|
`CronetProvider.createBuilder()` until one has been successfully created. This
|
||||||
approach also allows you to determine when the `CronetEngine` has been obtained
|
approach also allows you to determine when the `CronetEngine` has been obtained
|
||||||
from Cronet Fallback, in which case you can avoid using it for ExoPlayer whilst
|
from Cronet Fallback, in which case you can avoid using `CronetDataSource`
|
||||||
still using it for other networking performed by your application.
|
whilst still using Cronet Fallback for other networking performed by your
|
||||||
|
application.
|
||||||
|
|
||||||
[Send a simple request]: https://developer.android.com/guide/topics/connectivity/cronet/start
|
[Send a simple request]: https://developer.android.com/guide/topics/connectivity/cronet/start
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
# ExoPlayer Leanback extension
|
# Leanback UI module
|
||||||
|
|
||||||
This [Leanback][] Extension provides a [PlayerAdapter][] implementation for
|
This module provides a [PlayerAdapter][] wrapper for `Player`, making it
|
||||||
ExoPlayer.
|
possible to connect `Player` implementations such as `ExoPlayer` to the playback
|
||||||
|
widgets provided by `androidx.leanback:leanback`.
|
||||||
|
|
||||||
[PlayerAdapter]: https://developer.android.com/reference/android/support/v17/leanback/media/PlayerAdapter.html
|
[PlayerAdapter]: https://developer.android.com/reference/android/support/v17/leanback/media/PlayerAdapter.html
|
||||||
[Leanback]: https://developer.android.com/reference/android/support/v17/leanback/package-summary.html
|
[Leanback]: https://developer.android.com/reference/android/support/v17/leanback/package-summary.html
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# ExoPlayer OkHttp extension
|
# OkHttp DataSource module
|
||||||
|
|
||||||
The OkHttp extension is an [HttpDataSource][] implementation that uses Square's
|
This module provides an [HttpDataSource][] implementation that uses Square's
|
||||||
[OkHttp][].
|
[OkHttp][].
|
||||||
|
|
||||||
OkHttp is a modern network stack that's widely used by many popular Android
|
OkHttp is a modern network stack that's widely used by many popular Android
|
||||||
@ -35,8 +35,8 @@ locally. Instructions for doing this can be found in the [top level README][].
|
|||||||
|
|
||||||
## Using the module
|
## Using the module
|
||||||
|
|
||||||
ExoPlayer requests data through `DataSource` instances. These instances are
|
Media components request data through `DataSource` instances. These instances
|
||||||
obtained from instances of `DataSource.Factory`, which are instantiated and
|
are obtained from instances of `DataSource.Factory`, which are instantiated and
|
||||||
injected from application code.
|
injected from application code.
|
||||||
|
|
||||||
If your application only needs to play http(s) content, using the OkHttp
|
If your application only needs to play http(s) content, using the OkHttp
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# ExoPlayer RTMP extension
|
# RTMP DataSource module
|
||||||
|
|
||||||
The RTMP extension is a [DataSource][] implementation for playing [RTMP][]
|
This module provides a [DataSource][] implementation for requesting [RTMP][]
|
||||||
streams using [LibRtmp Client for Android][].
|
streams using [LibRtmp Client for Android][].
|
||||||
|
|
||||||
[DataSource]: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/DataSource.html
|
[DataSource]: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/DataSource.html
|
||||||
@ -33,8 +33,8 @@ locally. Instructions for doing this can be found in the [top level README][].
|
|||||||
|
|
||||||
## Using the module
|
## Using the module
|
||||||
|
|
||||||
ExoPlayer requests data through `DataSource` instances. These instances are
|
Media components request data through `DataSource` instances. These instances
|
||||||
obtained from instances of `DataSource.Factory`, which are instantiated and
|
are obtained from instances of `DataSource.Factory`, which are instantiated and
|
||||||
injected from application code.
|
injected from application code.
|
||||||
|
|
||||||
`DefaultDataSource` will automatically use the RTMP extension whenever it's
|
`DefaultDataSource` will automatically use the RTMP extension whenever it's
|
||||||
|
@ -1,12 +1,30 @@
|
|||||||
# ExoPlayer DASH library module
|
# ExoPlayer DASH module
|
||||||
|
|
||||||
Provides support for Dynamic Adaptive Streaming over HTTP (DASH) content.
|
Provides support for Dynamic Adaptive Streaming over HTTP (DASH) content in
|
||||||
|
ExoPlayer.
|
||||||
|
|
||||||
|
## Getting the module
|
||||||
|
|
||||||
|
The easiest way to get the module is to add it as a gradle dependency:
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
implementation 'com.google.android.exoplayer:exoplayer-dash:2.X.X'
|
||||||
|
```
|
||||||
|
|
||||||
|
where `2.X.X` is the version, which must match the version of the other media
|
||||||
|
modules being used.
|
||||||
|
|
||||||
|
Alternatively, you can clone this GitHub project and depend on the module
|
||||||
|
locally. Instructions for doing this can be found in the [top level README][].
|
||||||
|
|
||||||
|
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
|
||||||
|
|
||||||
|
## Using the module
|
||||||
|
|
||||||
Adding a dependency to this module is all that's required to enable playback of
|
Adding a dependency to this module is all that's required to enable playback of
|
||||||
DASH `MediaItem`s added to an `ExoPlayer` or `SimpleExoPlayer` in their default
|
DASH media items added to `ExoPlayer` in its default configuration. Internally,
|
||||||
configurations. Internally, `DefaultMediaSourceFactory` will automatically
|
`DefaultMediaSourceFactory` will automatically detect the presence of the module
|
||||||
detect the presence of the module and convert DASH `MediaItem`s into
|
and convert a DASH `MediaItem` into a `DashMediaSource` for playback.
|
||||||
`DashMediaSource` instances for playback.
|
|
||||||
|
|
||||||
Similarly, a `DownloadManager` in its default configuration will use
|
Similarly, a `DownloadManager` in its default configuration will use
|
||||||
`DefaultDownloaderFactory`, which will automatically detect the presence of
|
`DefaultDownloaderFactory`, which will automatically detect the presence of
|
||||||
|
@ -1,12 +1,29 @@
|
|||||||
# ExoPlayer HLS library module
|
# ExoPlayer HLS module
|
||||||
|
|
||||||
Provides support for HTTP Live Streaming (HLS) content.
|
Provides support for HTTP Live Streaming (HLS) content in ExoPlayer.
|
||||||
|
|
||||||
|
## Getting the module
|
||||||
|
|
||||||
|
The easiest way to get the module is to add it as a gradle dependency:
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
implementation 'com.google.android.exoplayer:exoplayer-hls:2.X.X'
|
||||||
|
```
|
||||||
|
|
||||||
|
where `2.X.X` is the version, which must match the version of the other media
|
||||||
|
modules being used.
|
||||||
|
|
||||||
|
Alternatively, you can clone this GitHub project and depend on the module
|
||||||
|
locally. Instructions for doing this can be found in the [top level README][].
|
||||||
|
|
||||||
|
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
|
||||||
|
|
||||||
|
## Using the module
|
||||||
|
|
||||||
Adding a dependency to this module is all that's required to enable playback of
|
Adding a dependency to this module is all that's required to enable playback of
|
||||||
HLS `MediaItem`s added to an `ExoPlayer` or `SimpleExoPlayer` in their default
|
HLS media items added to `ExoPlayer` in its default configuration. Internally,
|
||||||
configurations. Internally, `DefaultMediaSourceFactory` will automatically
|
`DefaultMediaSourceFactory` will automatically detect the presence of the module
|
||||||
detect the presence of the module and convert HLS `MediaItem`s into
|
and convert an HLS `MediaItem` into an `HlsMediaSource` for playback.
|
||||||
`HlsMediaSource` instances for playback.
|
|
||||||
|
|
||||||
Similarly, a `DownloadManager` in its default configuration will use
|
Similarly, a `DownloadManager` in its default configuration will use
|
||||||
`DefaultDownloaderFactory`, which will automatically detect the presence of
|
`DefaultDownloaderFactory`, which will automatically detect the presence of
|
||||||
|
38
library/rtsp/README.md
Normal file
38
library/rtsp/README.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# ExoPlayer RTSP module
|
||||||
|
|
||||||
|
Provides support for RTSP playbacks in ExoPlayer.
|
||||||
|
|
||||||
|
## Getting the module
|
||||||
|
|
||||||
|
The easiest way to get the module is to add it as a gradle dependency:
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
implementation 'com.google.android.exoplayer:exoplayer-rtsp:2.X.X'
|
||||||
|
```
|
||||||
|
|
||||||
|
where `2.X.X` is the version, which must match the version of the other media
|
||||||
|
modules being used.
|
||||||
|
|
||||||
|
Alternatively, you can clone this GitHub project and depend on the module
|
||||||
|
locally. Instructions for doing this can be found in the [top level README][].
|
||||||
|
|
||||||
|
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
|
||||||
|
|
||||||
|
## Using the module
|
||||||
|
|
||||||
|
Adding a dependency to this module is all that's required to enable playback of
|
||||||
|
RTSP media items added to `ExoPlayer` in its default configuration. Internally,
|
||||||
|
`DefaultMediaSourceFactory` will automatically detect the presence of the module
|
||||||
|
and convert a RTSP `MediaItem` into a `RtspMediaSource` for playback.
|
||||||
|
|
||||||
|
For advanced playback use cases, applications can build `RtspMediaSource`
|
||||||
|
instances and pass them directly to the player.
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
* [Developer Guide][].
|
||||||
|
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.source.rtsp.*` belong to
|
||||||
|
this module.
|
||||||
|
|
||||||
|
[Developer Guide]: https://exoplayer.dev/dash.html
|
||||||
|
[Javadoc]: https://exoplayer.dev/doc/reference/index.html
|
@ -1,12 +1,28 @@
|
|||||||
# ExoPlayer SmoothStreaming library module
|
# ExoPlayer SmoothStreaming module
|
||||||
|
|
||||||
Provides support for SmoothStreaming content.
|
Provides support for SmoothStreaming content in ExoPlayer.
|
||||||
|
|
||||||
|
## Getting the module
|
||||||
|
|
||||||
|
The easiest way to get the module is to add it as a gradle dependency:
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.X.X'
|
||||||
|
```
|
||||||
|
|
||||||
|
where `2.X.X` is the version, which must match the version of the other media
|
||||||
|
modules being used.
|
||||||
|
|
||||||
|
Alternatively, you can clone this GitHub project and depend on the module
|
||||||
|
locally. Instructions for doing this can be found in the [top level README][].
|
||||||
|
|
||||||
|
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
|
||||||
|
|
||||||
Adding a dependency to this module is all that's required to enable playback of
|
Adding a dependency to this module is all that's required to enable playback of
|
||||||
SmoothStreaming `MediaItem`s added to an `ExoPlayer` or `SimpleExoPlayer` in
|
SmoothStreaming media items added to `ExoPlayer` in its default configuration.
|
||||||
their default configurations. Internally, `DefaultMediaSourceFactory` will
|
Internally, `DefaultMediaSourceFactory` will automatically detect the presence
|
||||||
automatically detect the presence of the module and convert SmoothStreaming
|
of the module and convert a SmoothStreaming `MediaItem` into a `SsMediaSource`
|
||||||
`MediaItem`s into `SsMediaSource` instances for playback.
|
for playback.
|
||||||
|
|
||||||
Similarly, a `DownloadManager` in its default configuration will use
|
Similarly, a `DownloadManager` in its default configuration will use
|
||||||
`DefaultDownloaderFactory`, which will automatically detect the presence of
|
`DefaultDownloaderFactory`, which will automatically detect the presence of
|
||||||
|
@ -1,12 +1,27 @@
|
|||||||
# ExoPlayer UI library module
|
# UI module
|
||||||
|
|
||||||
Provides UI components and resources for use with ExoPlayer.
|
Provides UI components for media playback.
|
||||||
|
|
||||||
|
## Getting the module
|
||||||
|
|
||||||
|
The easiest way to use the module is to add it as a gradle dependency:
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
implementation 'com.google.android.exoplayer:exoplayer-ui:2.X.X'
|
||||||
|
```
|
||||||
|
|
||||||
|
where `2.X.X` is the version, which must match the version of the other media
|
||||||
|
modules being used.
|
||||||
|
|
||||||
|
Alternatively, you can clone this GitHub project and depend on the module
|
||||||
|
locally. Instructions for doing this can be found in the [top level README][].
|
||||||
|
|
||||||
|
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
* [Developer Guide][].
|
* [Developer Guide][].
|
||||||
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.ui.*`
|
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.ui.*` belong to this module.
|
||||||
belong to this module.
|
|
||||||
|
|
||||||
[Developer Guide]: https://exoplayer.dev/ui-components.html
|
[Developer Guide]: https://exoplayer.dev/ui-components.html
|
||||||
[Javadoc]: https://exoplayer.dev/doc/reference/index.html
|
[Javadoc]: https://exoplayer.dev/doc/reference/index.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user