Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
271011c6
authored
Jun 03, 2021
by
olly
Committed by
bachinger
Jun 03, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Align README and helloworld documentation
#minor-release PiperOrigin-RevId: 377269770
parent
e99ca161
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
27 deletions
README.md
docs/hello-world.md
README.md
View file @
271011c6
...
...
@@ -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
...
...
docs/hello-world.md
View file @
271011c6
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment