Skip to content

Commit 19dfc16

Browse files
committed
Merge pull request google#45 in AND/exoplayer from ssurmay/2.13.3 to master
* commit '7e630278009b3e876fbd85b8aac5a53a7cb8d219': (52 commits) Remove release notes item about publication intructions Mention publishing to Google Maven at top of release notes. fix release notes Bump version to 2.13.3 Parse DASH forced_subtitle role Switch DashManifestParser to use Ascii.equalsIgnoreCase Merge pull request google#8764 from uvjustin:dev-v2 Upgrade IMA SDK dependency to 3.23.0 StyledPlayerView: Fix layout issues HLS: Fix incorrect handling of byte ranges for EXT-X-MAP tags Fix SimpleExoPlayer documentation HLS: Set initial SampleQueue start times Ffmpeg extension: Wait for channel count and sample rate Use outputStreamEnded for MetadataRenderer#isEnded Release all PlaybackStatsListener session when timeline becomes empty. Add back jcenter() to repositories Use Metadata.Entry.toString in PlaybackOutput test logging if possible Update instructions for GMaven releasing Merge pull request google#8720 from dlafayet:tts-shear-block StyledPlayerControlView: Fix view measurement issue ...
2 parents 4cd0357 + 7e63027 commit 19dfc16

File tree

102 files changed

+3549
-588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+3549
-588
lines changed

README.md

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,26 @@ and extend, and can be updated through Play Store application updates.
2222

2323
## Using ExoPlayer ##
2424

25-
ExoPlayer modules can be obtained from JCenter. It's also possible to clone the
26-
repository and depend on the modules locally.
25+
ExoPlayer modules can be obtained from [the Google Maven repository][]. It's
26+
also possible to clone the repository and depend on the modules locally.
2727

28-
### From JCenter ###
28+
### From the Google Maven repository
2929

30-
#### 1. Add repositories ####
30+
#### 1. Add ExoPlayer module dependencies ####
3131

3232
The easiest way to get started using ExoPlayer is to add it as a gradle
33-
dependency. You need to make sure you have the Google and JCenter repositories
34-
included in the `build.gradle` file in the root of your project:
35-
36-
```gradle
37-
repositories {
38-
google()
39-
jcenter()
40-
}
41-
```
42-
43-
#### 2. Add ExoPlayer module dependencies ####
44-
45-
Next add a dependency in the `build.gradle` file of your app module. The
46-
following will add a dependency to the full library:
33+
dependency in the `build.gradle` file of your app module. The following will add
34+
a dependency to the full library:
4735

4836
```gradle
4937
implementation 'com.google.android.exoplayer:exoplayer:2.X.X'
5038
```
5139

5240
where `2.X.X` is your preferred version.
5341

42+
Note: old versions of ExoPlayer are available via JCenter. To use them, you need
43+
to add `jcenter()` to your project's root build.gradle `repositories` block.
44+
5445
As an alternative to the full library, you can depend on only the library
5546
modules that you actually need. For example the following will add dependencies
5647
on the Core, DASH and UI library modules, as might be required for an app that
@@ -72,18 +63,19 @@ individually.
7263
* `exoplayer-smoothstreaming`: Support for SmoothStreaming content.
7364
* `exoplayer-ui`: UI components and resources for use with ExoPlayer.
7465

75-
In addition to library modules, ExoPlayer has multiple extension modules that
76-
depend on external libraries to provide additional functionality. Some
77-
extensions are available from JCenter, whereas others must be built manually.
66+
In addition to library modules, ExoPlayer has extension modules that depend on
67+
external libraries to provide additional functionality. Some extensions are
68+
available from the Maven repository, whereas others must be built manually.
7869
Browse the [extensions directory][] and their individual READMEs for details.
7970

80-
More information on the library and extension modules that are available from
81-
JCenter can be found on [Bintray][].
71+
More information on the library and extension modules that are available can be
72+
found on the [Google Maven ExoPlayer page][].
8273

8374
[extensions directory]: https://github.com/google/ExoPlayer/tree/release-v2/extensions/
84-
[Bintray]: https://bintray.com/google/exoplayer
75+
[the Google Maven repository]: https://developer.android.com/studio/build/dependencies#google-maven
76+
[Google Maven ExoPlayer page]: https://maven.google.com/web/index.html#com.google.android.exoplayer
8577

86-
#### 3. Turn on Java 8 support ####
78+
#### 2. Turn on Java 8 support ####
8779

8880
If not enabled already, you also need to turn on Java 8 support in all
8981
`build.gradle` files depending on ExoPlayer, by adding the following to the

RELEASENOTES.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,79 @@
11
# Release notes
22

3+
### 2.13.3 (2021-04-14)
4+
5+
* Published via the Google Maven repository (i.e., google()) rather than JCenter.
6+
* Core:
7+
* Reset playback speed when live playback speed control becomes unused
8+
([#8664](https://github.com/google/ExoPlayer/issues/8664)).
9+
* Fix playback position issue when re-preparing playback after a
10+
BehindLiveWindowException
11+
([#8675](https://github.com/google/ExoPlayer/issues/8675)).
12+
* Assume Dolby Vision content is encoded as H264 when calculating maximum
13+
codec input size
14+
([#8705](https://github.com/google/ExoPlayer/issues/8705)).
15+
* UI:
16+
* Fix `StyledPlayerView` scrubber not reappearing correctly in some cases
17+
([#8646](https://github.com/google/ExoPlayer/issues/8646)).
18+
* Fix measurement of `StyledPlayerView` and `StyledPlayerControlView` when
19+
`wrap_content` is used
20+
([#8726](https://github.com/google/ExoPlayer/issues/8726)).
21+
* Fix `StyledPlayerControlView` to stay in full mode (rather than minimal
22+
mode) when possible
23+
([#8763](https://github.com/google/ExoPlayer/issues/8763)).
24+
* DASH:
25+
* Parse `forced_subtitle` role from DASH manifests
26+
([#8781](https://github.com/google/ExoPlayer/issues/8781)).
27+
* HLS:
28+
* Fix bug of ignoring `EXT-X-START` when setting the live target offset
29+
([#8764](https://github.com/google/ExoPlayer/pull/8764)).
30+
* Fix incorrect application of byte ranges to `EXT-X-MAP` tags
31+
([#8783](https://github.com/google/ExoPlayer/issues/8783)).
32+
* Fix issue that could cause playback to become stuck if corresponding
33+
`EXT-X-DISCONTINUITY` tags in different media playlists occur at
34+
different positions in time
35+
([#8372](https://github.com/google/ExoPlayer/issues/8372)).
36+
* Fix issue that could cause playback of on-demand content to not start in
37+
cases where the media playlists referenced by the master playlist have
38+
different starting `EXT-X-PROGRAM-DATE-TIME` tags.
39+
* Fix container type detection for segments with incorrect file extension
40+
or HTTP Content-Type
41+
([#8733](https://github.com/google/ExoPlayer/issues/8733)).
42+
* Extractors:
43+
* Add support for `GContainer` and `GContainerItem` XMP namespace prefixes
44+
in JPEG motion photo parsing.
45+
* Allow JFIF APP0 marker segment preceding Exif APP1 segment in
46+
`JpegExtractor`.
47+
* Text:
48+
* Parse SSA/ASS bold & italic info in `Style:` lines
49+
([#8435](https://github.com/google/ExoPlayer/issues/8435)).
50+
* Don't display subtitles after the end position of the current media
51+
period (if known). This ensures sideloaded subtitles respect the end
52+
point of `ClippingMediaPeriod` and prevents content subtitles from
53+
continuing to be displayed over mid-roll ads
54+
([#5317](https://github.com/google/ExoPlayer/issues/5317),
55+
[#8456](https://github.com/google/ExoPlayer/issues/8456)).
56+
* Fix CEA-708 priority handling to sort cues in the order defined by the
57+
spec ([#8704](https://github.com/google/ExoPlayer/issues/8704)).
58+
* Support TTML `textEmphasis` attributes, used for Japanese boutens.
59+
* Support TTML `shear` attributes.
60+
* Metadata:
61+
* Ensure that timed metadata near the end of a period is not dropped
62+
([#8710](https://github.com/google/ExoPlayer/issues/8710)).
63+
* Cast extension:
64+
* Fix `onPositionDiscontinuity` event so that it is not triggered with
65+
reason `DISCONTINUITY_REASON_PERIOD_TRANSITION` after a seek to another
66+
media item and so that it is not triggered after a timeline change.
67+
* IMA extension:
68+
* Fix error caused by `AdPlaybackState` ad group times being cleared,
69+
which can occur if the `ImaAdsLoader` is released while an ad is pending
70+
loading ([#8693](https://github.com/google/ExoPlayer/issues/8693)).
71+
* Upgrade IMA SDK dependency to 3.23.0, fixing an issue with
72+
`NullPointerExceptions` within `WebView` callbacks
73+
([#8447](https://github.com/google/ExoPlayer/issues/8447)).
74+
* FFmpeg extension: Fix playback failure when switching to TrueHD tracks
75+
during playback ([#8616](https://github.com/google/ExoPlayer/issues/8616)).
76+
377
### 2.13.2 (2021-02-25)
478

579
* Extractors:

build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ buildscript {
1818
}
1919
dependencies {
2020
classpath 'com.android.tools.build:gradle:4.0.1'
21-
classpath 'com.novoda:bintray-release:0.9.1'
2221
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.1'
2322

2423
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.9.7'
@@ -29,9 +28,6 @@ allprojects {
2928
google()
3029
jcenter()
3130
}
32-
project.ext {
33-
exoplayerPublishEnabled = false
34-
}
3531
if (it.hasProperty('externalBuildDir')) {
3632
if (!new File(externalBuildDir).isAbsolute()) {
3733
externalBuildDir = new File(rootDir, externalBuildDir)

constants.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// limitations under the License.
1414
project.ext {
1515
// ExoPlayer version and version code.
16-
releaseVersion = '2.13.2'
17-
releaseVersionCode = 2013002
16+
releaseVersion = '2.13.3'
17+
releaseVersionCode = 2013003
1818
minSdkVersion = 16
1919
appTargetSdkVersion = 29
2020
targetSdkVersion = 28 // TODO: Bump once b/143232359 is resolved. Also fix TODOs in UtilTest.

demos/cast/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ android {
3838
"proguard-rules.txt",
3939
getDefaultProguardFile('proguard-android.txt')
4040
]
41+
signingConfig signingConfigs.debug
4142
}
4243
debug {
4344
jniDebuggable = true

demos/gl/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ android {
3434
shrinkResources true
3535
minifyEnabled true
3636
proguardFiles getDefaultProguardFile('proguard-android.txt')
37+
signingConfig signingConfigs.debug
3738
}
3839
}
3940

demos/main/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ android {
3838
"proguard-rules.txt",
3939
getDefaultProguardFile('proguard-android.txt')
4040
]
41+
signingConfig signingConfigs.debug
4142
}
4243
debug {
4344
jniDebuggable = true

demos/main/src/main/assets/media.exolist.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,13 @@
485485
"subtitle_mime_type": "application/ttml+xml",
486486
"subtitle_language": "ja"
487487
},
488+
{
489+
"name": "TTML Netflix Japanese examples (IMSC1.1)",
490+
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4",
491+
"subtitle_uri": "https://storage.googleapis.com/exoplayer-test-media-1/ttml/netflix_japanese_ttml.xml",
492+
"subtitle_mime_type": "application/ttml+xml",
493+
"subtitle_language": "ja"
494+
},
488495
{
489496
"name": "WebVTT positioning",
490497
"uri": "https://html5demos.com/assets/dizzy.mp4",

demos/main/src/main/java/com/google/android/exoplayer2/demo/IntentUtil.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import androidx.annotation.Nullable;
2424
import com.google.android.exoplayer2.C;
2525
import com.google.android.exoplayer2.MediaItem;
26+
import com.google.android.exoplayer2.MediaMetadata;
2627
import com.google.android.exoplayer2.util.Assertions;
2728
import com.google.android.exoplayer2.util.Util;
2829
import com.google.common.collect.ImmutableList;
@@ -42,12 +43,12 @@ public class IntentUtil {
4243
"com.google.android.exoplayer.demo.action.VIEW_LIST";
4344

4445
// Activity extras.
45-
4646
public static final String PREFER_EXTENSION_DECODERS_EXTRA = "prefer_extension_decoders";
4747

4848
// Media item configuration extras.
4949

5050
public static final String URI_EXTRA = "uri";
51+
public static final String TITLE_EXTRA = "title";
5152
public static final String MIME_TYPE_EXTRA = "mime_type";
5253
public static final String CLIP_START_POSITION_MS_EXTRA = "clip_start_position_ms";
5354
public static final String CLIP_END_POSITION_MS_EXTRA = "clip_end_position_ms";
@@ -89,6 +90,9 @@ public static void addToIntent(List<MediaItem> mediaItems, Intent intent) {
8990
MediaItem mediaItem = mediaItems.get(0);
9091
MediaItem.PlaybackProperties playbackProperties = checkNotNull(mediaItem.playbackProperties);
9192
intent.setAction(ACTION_VIEW).setData(mediaItem.playbackProperties.uri);
93+
if (mediaItem.mediaMetadata.title != null) {
94+
intent.putExtra(TITLE_EXTRA, mediaItem.mediaMetadata.title);
95+
}
9296
addPlaybackPropertiesToIntent(playbackProperties, intent, /* extrasKeySuffix= */ "");
9397
addClippingPropertiesToIntent(
9498
mediaItem.clippingProperties, intent, /* extrasKeySuffix= */ "");
@@ -102,17 +106,22 @@ public static void addToIntent(List<MediaItem> mediaItems, Intent intent) {
102106
addPlaybackPropertiesToIntent(playbackProperties, intent, /* extrasKeySuffix= */ "_" + i);
103107
addClippingPropertiesToIntent(
104108
mediaItem.clippingProperties, intent, /* extrasKeySuffix= */ "_" + i);
109+
if (mediaItem.mediaMetadata.title != null) {
110+
intent.putExtra(TITLE_EXTRA + ("_" + i), mediaItem.mediaMetadata.title);
111+
}
105112
}
106113
}
107114
}
108115

109116
private static MediaItem createMediaItemFromIntent(
110117
Uri uri, Intent intent, String extrasKeySuffix) {
111118
@Nullable String mimeType = intent.getStringExtra(MIME_TYPE_EXTRA + extrasKeySuffix);
119+
@Nullable String title = intent.getStringExtra(TITLE_EXTRA + extrasKeySuffix);
112120
MediaItem.Builder builder =
113121
new MediaItem.Builder()
114122
.setUri(uri)
115123
.setMimeType(mimeType)
124+
.setMediaMetadata(new MediaMetadata.Builder().setTitle(title).build())
116125
.setAdTagUri(intent.getStringExtra(AD_TAG_URI_EXTRA + extrasKeySuffix))
117126
.setSubtitles(createSubtitlesFromIntent(intent, extrasKeySuffix))
118127
.setClipStartPositionMs(

demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ public void onPlaybackStateChanged(@Player.State int playbackState) {
440440
@Override
441441
public void onPlayerError(@NonNull ExoPlaybackException e) {
442442
if (isBehindLiveWindow(e)) {
443-
clearStartPosition();
444-
initializePlayer();
443+
player.seekToDefaultPosition();
444+
player.prepare();
445445
} else {
446446
updateButtonVisibility();
447447
showControls();

0 commit comments

Comments
 (0)