Name Date Size #Lines LOC

..--

.github/ISSUE_TEMPLATE/H25-Apr-2025-184160

demos/H25-Apr-2025-8,1926,283

docs/H25-Apr-2025-737,495641,824

extensions/H25-Apr-2025-36,72526,457

gradle/wrapper/H25-Apr-2025-65

library/H25-Apr-2025-345,534235,553

playbacktests/H25-Apr-2025-2,7062,033

robolectricutils/H25-Apr-2025-1,291767

testdata/H25-Apr-2025-112,714111,735

testutils/H25-Apr-2025-19,68713,246

.gitignoreH A D25-Apr-20251 KiB7964

CONTRIBUTING.mdH A D25-Apr-20251.7 KiB4229

LICENSEH A D25-Apr-202511.1 KiB203169

README.mdH A D25-Apr-20255.1 KiB141102

RELEASENOTES.mdH A D25-Apr-2025233.7 KiB4,2874,088

SECURITY.mdH A D25-Apr-2025453 108

build.gradleH A D25-Apr-20251.2 KiB3937

common_library_config.gradleH A D25-Apr-20251.2 KiB3429

constants.gradleH A D25-Apr-20252.3 KiB6160

core_settings.gradleH A D25-Apr-20254.7 KiB9481

gradle.propertiesH A D25-Apr-2025271 87

gradlewH A D25-Apr-20257.9 KiB23598

gradlew.batH A D25-Apr-20252.7 KiB9068

javadoc_combined.gradleH A D25-Apr-20256.4 KiB155141

javadoc_library.gradleH A D25-Apr-20251.9 KiB5250

javadoc_util.gradleH A D25-Apr-20252.5 KiB5049

missing_aar_type_workaround.gradleH A D25-Apr-20254 KiB9895

publish.gradleH A D25-Apr-20252.3 KiB6561

settings.gradleH A D25-Apr-20251.5 KiB3631

README.md

1# ExoPlayer <img src="https://img.shields.io/github/v/release/google/ExoPlayer.svg?label=latest"/>
2
3ExoPlayer is an application level media player for Android. It provides an
4alternative to Android’s MediaPlayer API for playing audio and video both
5locally and over the Internet. ExoPlayer supports features not currently
6supported by Android’s MediaPlayer API, including DASH and SmoothStreaming
7adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize
8and extend, and can be updated through Play Store application updates.
9
10## Documentation
11
12* The [developer guide][] provides a wealth of information.
13* The [class reference][] documents ExoPlayer classes.
14* The [release notes][] document the major changes in each release.
15* Follow our [developer blog][] to keep up to date with the latest ExoPlayer
16  developments!
17
18[developer guide]: https://exoplayer.dev/guide.html
19[class reference]: https://exoplayer.dev/doc/reference
20[release notes]: https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md
21[developer blog]: https://medium.com/google-exoplayer
22
23## Using ExoPlayer
24
25ExoPlayer modules can be obtained from [the Google Maven repository][]. It's
26also possible to clone the repository and depend on the modules locally.
27
28[the Google Maven repository]: https://developer.android.com/studio/build/dependencies#google-maven
29
30### From the Google Maven repository
31
32#### 1. Add ExoPlayer module dependencies
33
34The easiest way to get started using ExoPlayer is to add it as a gradle
35dependency in the `build.gradle` file of your app module. The following will add
36a dependency to the full library:
37
38```gradle
39implementation 'com.google.android.exoplayer:exoplayer:2.X.X'
40```
41
42where `2.X.X` is your preferred version.
43
44As an alternative to the full library, you can depend on only the library
45modules that you actually need. For example the following will add dependencies
46on the Core, DASH and UI library modules, as might be required for an app that
47only plays DASH content:
48
49```gradle
50implementation 'com.google.android.exoplayer:exoplayer-core:2.X.X'
51implementation 'com.google.android.exoplayer:exoplayer-dash:2.X.X'
52implementation 'com.google.android.exoplayer:exoplayer-ui:2.X.X'
53```
54
55When depending on individual modules they must all be the same version.
56
57The available library modules are listed below. Adding a dependency to the full
58ExoPlayer library is equivalent to adding dependencies on all of the library
59modules individually.
60
61* `exoplayer-core`: Core functionality (required).
62* `exoplayer-dash`: Support for DASH content.
63* `exoplayer-hls`: Support for HLS content.
64* `exoplayer-rtsp`: Support for RTSP content.
65* `exoplayer-smoothstreaming`: Support for SmoothStreaming content.
66* `exoplayer-transformer`: Media transformation functionality.
67* `exoplayer-ui`: UI components and resources for use with ExoPlayer.
68
69In addition to library modules, ExoPlayer has extension modules that depend on
70external libraries to provide additional functionality. Some extensions are
71available from the Maven repository, whereas others must be built manually.
72Browse the [extensions directory][] and their individual READMEs for details.
73
74More information on the library and extension modules that are available can be
75found on the [Google Maven ExoPlayer page][].
76
77[extensions directory]: https://github.com/google/ExoPlayer/tree/release-v2/extensions/
78[Google Maven ExoPlayer page]: https://maven.google.com/web/index.html#com.google.android.exoplayer
79
80#### 2. Turn on Java 8 support
81
82If not enabled already, you also need to turn on Java 8 support in all
83`build.gradle` files depending on ExoPlayer, by adding the following to the
84`android` section:
85
86```gradle
87compileOptions {
88  targetCompatibility JavaVersion.VERSION_1_8
89}
90```
91
92#### 3. Enable multidex
93
94If your Gradle `minSdkVersion` is 20 or lower, you should
95[enable multidex](https://developer.android.com/studio/build/multidex) in order
96to prevent build errors.
97
98### Locally
99
100Cloning the repository and depending on the modules locally is required when
101using some ExoPlayer extension modules. It's also a suitable approach if you
102want to make local changes to ExoPlayer, or if you want to use a development
103branch.
104
105First, clone the repository into a local directory:
106
107```sh
108git clone https://github.com/google/ExoPlayer.git
109cd ExoPlayer
110```
111
112Next, add the following to your project's `settings.gradle` file, replacing
113`path/to/exoplayer` with the path to your local copy:
114
115```gradle
116gradle.ext.exoplayerModulePrefix = 'exoplayer-'
117apply from: file("path/to/exoplayer/core_settings.gradle")
118```
119
120You should now see the ExoPlayer modules appear as part of your project. You can
121depend on them as you would on any other local module, for example:
122
123```gradle
124implementation project(':exoplayer-library-core')
125implementation project(':exoplayer-library-dash')
126implementation project(':exoplayer-library-ui')
127```
128
129## Developing ExoPlayer
130
131#### Project branches
132
133* Development work happens on the `dev-v2` branch. Pull requests should
134  normally be made to this branch.
135* The `release-v2` branch holds the most recent release.
136
137#### Using Android Studio
138
139To develop ExoPlayer using Android Studio, simply open the ExoPlayer project in
140the root directory of the repository.
141