Align README and helloworld documentation
#minor-release PiperOrigin-RevId: 377269770
This commit is contained in:
parent
e99ca16176
commit
271011c6f9
20
README.md
20
README.md
@ -25,6 +25,8 @@ and extend, and can be updated through Play Store application updates.
|
||||
ExoPlayer modules can be obtained from [the Google Maven repository][]. It's
|
||||
also possible to clone the repository and depend on the modules locally.
|
||||
|
||||
[the Google Maven repository]: https://developer.android.com/studio/build/dependencies#google-maven
|
||||
|
||||
### From the Google Maven repository
|
||||
|
||||
#### 1. Add ExoPlayer module dependencies ####
|
||||
@ -39,13 +41,10 @@ implementation 'com.google.android.exoplayer:exoplayer:2.X.X'
|
||||
|
||||
where `2.X.X` is your preferred version.
|
||||
|
||||
Note: old versions of ExoPlayer are available via JCenter. To use them, you need
|
||||
to add `jcenter()` to your project's root build.gradle `repositories` block.
|
||||
|
||||
As an alternative to the full library, you can depend on only the library
|
||||
modules that you actually need. For example the following will add dependencies
|
||||
on the Core, DASH and UI library modules, as might be required for an app that
|
||||
plays DASH content:
|
||||
only plays DASH content:
|
||||
|
||||
```gradle
|
||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.X.X'
|
||||
@ -54,13 +53,15 @@ implementation 'com.google.android.exoplayer:exoplayer-ui:2.X.X'
|
||||
```
|
||||
|
||||
The available library modules are listed below. Adding a dependency to the full
|
||||
library is equivalent to adding dependencies on all of the library modules
|
||||
individually.
|
||||
ExoPlayer library is equivalent to adding dependencies on all of the library
|
||||
modules individually.
|
||||
|
||||
* `exoplayer-core`: Core functionality (required).
|
||||
* `exoplayer-dash`: Support for DASH content.
|
||||
* `exoplayer-hls`: Support for HLS content.
|
||||
* `exoplayer-rtsp`: Support for RTSP content.
|
||||
* `exoplayer-smoothstreaming`: Support for SmoothStreaming content.
|
||||
* `exoplayer-transformer`: Media transformation functionality.
|
||||
* `exoplayer-ui`: UI components and resources for use with ExoPlayer.
|
||||
|
||||
In addition to library modules, ExoPlayer has extension modules that depend on
|
||||
@ -72,7 +73,6 @@ More information on the library and extension modules that are available can be
|
||||
found on the [Google Maven ExoPlayer page][].
|
||||
|
||||
[extensions directory]: https://github.com/google/ExoPlayer/tree/release-v2/extensions/
|
||||
[the Google Maven repository]: https://developer.android.com/studio/build/dependencies#google-maven
|
||||
[Google Maven ExoPlayer page]: https://maven.google.com/web/index.html#com.google.android.exoplayer
|
||||
|
||||
#### 2. Turn on Java 8 support ####
|
||||
@ -87,6 +87,12 @@ compileOptions {
|
||||
}
|
||||
```
|
||||
|
||||
#### 3. Enable multidex ####
|
||||
|
||||
If your Gradle `minSdkVersion` is 20 or lower, you should
|
||||
[enable multidex](https://developer.android.com/studio/build/multidex) in order
|
||||
to prevent build errors.
|
||||
|
||||
### Locally ###
|
||||
|
||||
Cloning the repository and depending on the modules locally is required when
|
||||
|
@ -24,24 +24,11 @@ These steps are described in more detail below. For a complete example, refer to
|
||||
|
||||
## Adding ExoPlayer as a dependency ##
|
||||
|
||||
### Add repositories ###
|
||||
|
||||
The first step to getting started is to make sure you have the Google and
|
||||
JCenter repositories included in the `build.gradle` file in the root of your
|
||||
project.
|
||||
|
||||
~~~
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
~~~
|
||||
{: .language-gradle}
|
||||
|
||||
### Add ExoPlayer modules ###
|
||||
|
||||
Next add a dependency in the `build.gradle` file of your app module. The
|
||||
following will add a dependency to the full ExoPlayer library:
|
||||
The easiest way to get started using ExoPlayer is to add it as a gradle
|
||||
dependency in the `build.gradle` file of your app module. The following will add
|
||||
a dependency to the full library:
|
||||
|
||||
~~~
|
||||
implementation 'com.google.android.exoplayer:exoplayer:2.X.X'
|
||||
@ -75,9 +62,13 @@ modules individually.
|
||||
* `exoplayer-transformer`: Media transformation functionality.
|
||||
* `exoplayer-ui`: UI components and resources for use with ExoPlayer.
|
||||
|
||||
In addition to library modules, ExoPlayer has multiple extension modules that
|
||||
depend on external libraries to provide additional functionality. Browse the
|
||||
[extensions directory][] and their individual READMEs for details.
|
||||
In addition to library modules, ExoPlayer has extension modules that depend on
|
||||
external libraries to provide additional functionality. Some extensions are
|
||||
available from the Maven repository, whereas others must be built manually.
|
||||
Browse the [extensions directory][] and their individual READMEs for details.
|
||||
|
||||
More information on the library and extension modules that are available can be
|
||||
found on the [Google Maven ExoPlayer page][].
|
||||
|
||||
### Turn on Java 8 support ###
|
||||
|
||||
@ -239,4 +230,4 @@ can be done by calling `ExoPlayer.release`.
|
||||
[Playlists page]: {{ site.baseurl }}/playlists.html
|
||||
[Media items page]: {{ site.baseurl }}/media-items.html
|
||||
[Media sources page]: {{ site.baseurl }}/media-sources.html
|
||||
|
||||
[Google Maven ExoPlayer page]: https://maven.google.com/web/index.html#com.google.android.exoplayer
|
||||
|
Loading…
x
Reference in New Issue
Block a user