Skip to content

Commit

Permalink
Merge pull request #8102 from google/dev-v2-r2.12.1
Browse files Browse the repository at this point in the history
r2.12.1
  • Loading branch information
ojw28 authored Oct 22, 2020
2 parents 8a0d52b + 269ea4e commit be13805
Show file tree
Hide file tree
Showing 214 changed files with 6,627 additions and 1,459 deletions.
78 changes: 75 additions & 3 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,77 @@
# Release notes

### 2.12.1 (2020-10-23) ###

* Core library:
* Fix issue where `Player.setMediaItems` would ignore its `resetPosition`
argument ([#8024](https://github.com/google/ExoPlayer/issues/8024)).
* Fix bug where streams with highly uneven track durations may get stuck
in a buffering state
* Add 403, 500 and 503 to the list of HTTP status codes that can trigger
failover to another quality variant during adaptive playbacks.
* Data sources:
* Add support for `android.resource` URI scheme in `RawResourceDataSource`
([#7866](https://github.com/google/ExoPlayer/issues/7866)).
* Text:
* Add support for `\h` SSA/ASS style override code (non-breaking space).
* Fix playback of WebVTT subtitles in MP4 containers in DASH streams
([#7985](https://github.com/google/ExoPlayer/issues/7985)).
* Fix `NullPointerException` in `TextRenderer` when playing content with a
single subtitle buffer
([#8017](https://github.com/google/ExoPlayer/issues/8017)).
* UI:
* Fix animation when `StyledPlayerView` first shows its playback controls.
* Improve touch targets in `StyledPlayerView` to make tapping easier.
* Allow `subtitleButton` to be omitted in custom `StyledPlayerView`
layouts ([#7962](https://github.com/google/ExoPlayer/issues/7962)).
* Add an option to sort tracks by `Format` in `TrackSelectionView` and
`TrackSelectionDialogBuilder`
([#7709](https://github.com/google/ExoPlayer/issues/7709)).
* Audio:
* Fix the default audio sink position not advancing correctly when using
`AudioTrack` based speed adjustment
([#7982](https://github.com/google/ExoPlayer/issues/7982)).
* Fix `NoClassDefFoundError` warning for `AudioTrack$StreamEventCallback`
([#8058](https://github.com/google/ExoPlayer/issues/8058)).
* Extractors:
* MP4:
* Add support for `_mp2` boxes
([#7967](https://github.com/google/ExoPlayer/issues/7967)).
* Fix playback of files containing `pcm_alaw` or `pcm_mulaw` audio
tracks, by enabling sample rechunking for such tracks.
* MPEG-TS:
* Add `TsExtractor` parameter to configure the number of bytes in
which to search for timestamps when seeking and determining stream
duration ([#7988](https://github.com/google/ExoPlayer/issues/7988)).
* Ignore negative payload size in PES packets
([#8005](https://github.com/google/ExoPlayer/issues/8005)).
* MP3: Use TLEN ID3 tag to compute the stream duration
([#7949](https://github.com/google/ExoPlayer/issues/7949)).
* Ogg: Fix regression playing files with packets that span multiple pages
([#7992](https://github.com/google/ExoPlayer/issues/7992)).
* FLV: Make files seekable by using the key frame index
([#7378](https://github.com/google/ExoPlayer/issues/7378)).
* HLS: Fix crash affecting chunkful preparation of master playlists that start
with an I-FRAME only variant
([#8025](https://github.com/google/ExoPlayer/issues/8025)).
* IMA extension:
* Fix position reporting after fetch errors
([#7956](https://github.com/google/ExoPlayer/issues/7956)).
* Allow apps to specify a `VideoAdPlayerCallback`
([#7944](https://github.com/google/ExoPlayer/issues/7944)).
* Accept ad tags via the `AdsMediaSource` constructor and deprecate
passing them via the `ImaAdsLoader` constructor/builders. Passing the
ad tag via media item playback properties continues to be supported.
This is in preparation for supporting ads in playlists
([#3750](https://github.com/google/ExoPlayer/issues/3750)).
* Add a way to override ad media MIME types
([#7961)(https://github.com/google/ExoPlayer/issues/7961)).
* Fix incorrect truncation of large cue point positions
([#8067](https://github.com/google/ExoPlayer/issues/8067)).
* Upgrade IMA SDK dependency to 3.20.1. This brings in a fix for
companion ads rendering when targeting API 29
([#6432](https://github.com/google/ExoPlayer/issues/6432)).

### 2.12.0 (2020-09-11) ###

To learn more about what's new in 2.12, read the corresponding
Expand Down Expand Up @@ -163,7 +235,7 @@ To learn more about what's new in 2.12, read the corresponding
* Redefine `Cue.lineType=LINE_TYPE_NUMBER` in terms of aligning the cue
text lines to grid of viewport lines. Only consider `Cue.lineAnchor`
when `Cue.lineType=LINE_TYPE_FRACTION`.
* WebVTT
* WebVTT:
* Add support for default
[text](https://www.w3.org/TR/webvtt1/#default-text-color) and
[background](https://www.w3.org/TR/webvtt1/#default-text-background)
Expand All @@ -178,10 +250,10 @@ To learn more about what's new in 2.12, read the corresponding
* Parse the `ruby-position` CSS property.
* Parse the `text-combine-upright` CSS property (i.e., tate-chu-yoko).
* Parse the `<ruby>` and `<rt>` tags.
* TTML
* TTML:
* Parse the `tts:combineText` property (i.e., tate-chu-yoko).
* Parse t`tts:ruby` and `tts:rubyPosition` properties.
* CEA-608
* CEA-608:
* Implement timing-out of stuck captions, as permitted by
ANSI/CTA-608-E R-2014 Annex C.9. The default timeout is set to 16
seconds ([#7181](https://github.com/google/ExoPlayer/issues/7181)).
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.novoda:bintray-release:0.9.1'
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.1'
}
Expand Down
4 changes: 2 additions & 2 deletions constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.
project.ext {
// ExoPlayer version and version code.
releaseVersion = '2.12.0'
releaseVersionCode = 2012000
releaseVersion = '2.12.1'
releaseVersionCode = 2012001
minSdkVersion = 16
appTargetSdkVersion = 29
targetSdkVersion = 28 // TODO: Bump once b/143232359 is resolved. Also fix TODOs in UtilTest.
Expand Down
2 changes: 2 additions & 0 deletions core_settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ include modulePrefix + 'library-extractor'
include modulePrefix + 'library-hls'
include modulePrefix + 'library-smoothstreaming'
include modulePrefix + 'library-ui'
include modulePrefix + 'robolectricutils'
include modulePrefix + 'testutils'
include modulePrefix + 'testdata'
include modulePrefix + 'extension-av1'
Expand Down Expand Up @@ -56,6 +57,7 @@ project(modulePrefix + 'library-extractor').projectDir = new File(rootDir, 'libr
project(modulePrefix + 'library-hls').projectDir = new File(rootDir, 'library/hls')
project(modulePrefix + 'library-smoothstreaming').projectDir = new File(rootDir, 'library/smoothstreaming')
project(modulePrefix + 'library-ui').projectDir = new File(rootDir, 'library/ui')
project(modulePrefix + 'robolectricutils').projectDir = new File(rootDir, 'robolectricutils')
project(modulePrefix + 'testutils').projectDir = new File(rootDir, 'testutils')
project(modulePrefix + 'testdata').projectDir = new File(rootDir, 'testdata')
project(modulePrefix + 'extension-av1').projectDir = new File(rootDir, 'extensions/av1')
Expand Down
7 changes: 0 additions & 7 deletions demos/main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ dependencies {
implementation 'androidx.appcompat:appcompat:' + androidxAppCompatVersion
implementation 'androidx.multidex:multidex:' + androidxMultidexVersion
implementation 'com.google.android.material:material:1.2.1'
implementation ('com.google.guava:guava:' + guavaVersion) {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
exclude group: 'org.checkerframework', module: 'checker-compat-qual'
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
}
implementation project(modulePrefix + 'library-core')
implementation project(modulePrefix + 'library-dash')
implementation project(modulePrefix + 'library-hls')
Expand Down
14 changes: 14 additions & 0 deletions demos/main/src/main/assets/media.exolist.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,20 @@
{
"name": "MPEG-4 Timed Text (tx3g, mov_text)",
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/mp4/dizzy-with-tx3g.mp4"
},
{
"name": "Japanese features (vertical + rubies) [TTML]",
"uri": "https://html5demos.com/assets/dizzy.mp4",
"subtitle_uri": "https://storage.googleapis.com/exoplayer-test-media-1/ttml/japanese-ttml.xml",
"subtitle_mime_type": "application/ttml+xml",
"subtitle_language": "ja"
},
{
"name": "Japanese features (vertical + rubies) [WebVTT]",
"uri": "https://html5demos.com/assets/dizzy.mp4",
"subtitle_uri": "https://storage.googleapis.com/exoplayer-test-media-1/webvtt/japanese.vtt",
"subtitle_mime_type": "text/vtt",
"subtitle_language": "ja"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class PlayerActivity extends AppCompatActivity
private int startWindow;
private long startPosition;

// Fields used only for ad playback. The ads loader is loaded via reflection.
// Fields used only for ad playback.

private AdsLoader adsLoader;
private Uri loadedAdTagUri;
Expand Down Expand Up @@ -375,7 +375,7 @@ private AdsLoader getAdsLoader(Uri adTagUri) {
}
// The ads loader is reused for multiple playbacks, so that ad playback can resume.
if (adsLoader == null) {
adsLoader = new ImaAdsLoader(/* context= */ PlayerActivity.this, adTagUri);
adsLoader = new ImaAdsLoader.Builder(/* context= */ this).build();
}
adsLoader.setPlayer(player);
return adsLoader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,12 @@ public View onCreateView(
trackSelectionView.setAllowMultipleOverrides(allowMultipleOverrides);
trackSelectionView.setAllowAdaptiveSelections(allowAdaptiveSelections);
trackSelectionView.init(
mappedTrackInfo, rendererIndex, isDisabled, overrides, /* listener= */ this);
mappedTrackInfo,
rendererIndex,
isDisabled,
overrides,
/* trackFormatComparator= */ null,
/* listener= */ this);
return rootView;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,13 @@ public void removeListener(EventListener listener) {
}
}

@Override
public void setMediaItems(List<MediaItem> mediaItems, boolean resetPosition) {
int windowIndex = resetPosition ? 0 : getCurrentWindowIndex();
long startPositionMs = resetPosition ? C.TIME_UNSET : getContentPosition();
setMediaItems(mediaItems, windowIndex, startPositionMs);
}

@Override
public void setMediaItems(
List<MediaItem> mediaItems, int startWindowIndex, long startPositionMs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.google.android.exoplayer2.ext.cast;

import android.content.Context;
import com.google.android.gms.cast.CastMediaControlIntent;
import com.google.android.gms.cast.framework.CastOptions;
import com.google.android.gms.cast.framework.OptionsProvider;
import com.google.android.gms.cast.framework.SessionProvider;
Expand All @@ -29,24 +28,12 @@
public final class DefaultCastOptionsProvider implements OptionsProvider {

/**
* App id of the Default Media Receiver app. Apps that do not require DRM support may use this
* receiver receiver app ID.
* App id that points to the Default Media Receiver app with basic DRM support.
*
* <p>See https://developers.google.com/cast/docs/caf_receiver/#default_media_receiver.
* <p>Applications that require more complex DRM authentication should <a
* href="https://developers.google.com/cast/docs/web_receiver/streaming_protocols#drm">create a
* custom receiver application</a>.
*/
public static final String APP_ID_DEFAULT_RECEIVER =
CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID;

/**
* App id for receiver app with rudimentary support for DRM.
*
* <p>This app id is only suitable for ExoPlayer's Cast Demo app, and it is not intended for
* production use. In order to use DRM, custom receiver apps should be used. For environments that
* do not require DRM, the default receiver app should be used (see {@link
* #APP_ID_DEFAULT_RECEIVER}).
*/
// TODO: Add a documentation resource link for DRM support in the receiver app [Internal ref:
// b/128603245].
public static final String APP_ID_DEFAULT_RECEIVER_WITH_DRM = "A12D4273";

@Override
Expand Down
7 changes: 0 additions & 7 deletions extensions/cronet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ dependencies {
api "com.google.android.gms:play-services-cronet:17.0.0"
implementation project(modulePrefix + 'library-core')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
implementation ('com.google.guava:guava:' + guavaVersion) {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
exclude group: 'org.checkerframework', module: 'checker-compat-qual'
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
}
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
testImplementation project(modulePrefix + 'library')
Expand Down
23 changes: 1 addition & 22 deletions extensions/ima/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,18 @@ android {
}

dependencies {
api 'com.google.ads.interactivemedia.v3:interactivemedia:3.19.4'
api 'com.google.ads.interactivemedia.v3:interactivemedia:3.20.1'
implementation project(modulePrefix + 'library-core')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
implementation ('com.google.guava:guava:' + guavaVersion) {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
exclude group: 'org.checkerframework', module: 'checker-compat-qual'
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
}
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
androidTestImplementation project(modulePrefix + 'testutils')
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestImplementation ('com.google.guava:guava:' + guavaVersion) {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
exclude group: 'org.checkerframework', module: 'checker-compat-qual'
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
}
androidTestCompileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
testImplementation project(modulePrefix + 'testutils')
testImplementation ('com.google.guava:guava:' + guavaVersion) {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
exclude group: 'org.checkerframework', module: 'checker-compat-qual'
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
}
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
}

Expand Down

This file was deleted.

Loading

0 comments on commit be13805

Please sign in to comment.