diff --git a/README.md b/README.md index d3c8c5e44c..3933f0bc18 100644 --- a/README.md +++ b/README.md @@ -115,9 +115,8 @@ Next, add the following to your project's `settings.gradle` file, replacing `path/to/exoplayer` with the path to your local copy: ```gradle -gradle.ext.exoplayerRoot = 'path/to/exoplayer' gradle.ext.exoplayerModulePrefix = 'exoplayer-' -apply from: file("$gradle.ext.exoplayerRoot/core_settings.gradle") +apply from: file("path/to/exoplayer/core_settings.gradle") ``` You should now see the ExoPlayer modules appear as part of your project. You can diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b5a922f3d0..2fb3ea49da 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,72 @@ # Release notes +### 2.15.1 (2021-09-20) + +* Core Library: + * Fix track selection in `StyledPlayerControlView` when using + `ForwardingPlayer`. + * Fix `FlagSet#equals` on API levels below 24. + * Fix `NullPointerException` being thrown from `CacheDataSource` when + reading a fully cached resource with `DataSpec.position` equal to the + resource length. + * Fix a bug when [depending on ExoPlayer locally](README.md#locally) with + a relative path + ([#9403](https://github.com/google/ExoPlayer/issues/9403)). + * Better handle invalid seek requests. Seeks to positions that are before + the start or after the end of the media are now handled as seeks to the + start and end respectively + ([8906](https://github.com/google/ExoPlayer/issues/8906)). + * Rename `MimeTypes.AUDIO_DTS_UHD` to `MimeTypes.AUDIO_DTS_X` and add + required profile to its value + ([#9429](https://github.com/google/ExoPlayer/issues/9429)). +* Extractors: + * Support TS packets without PTS flag + ([#9294](https://github.com/google/ExoPlayer/issues/9294)). + * Fix issue decoding ID3 tags containing UTF-16 encoded strings + ([#9087](https://github.com/google/ExoPlayer/issues/9087)). +* Video: + * Request smaller decoder input buffers for Dolby Vision. This fixes an + issue that could cause UHD Dolby Vision playbacks to fail on some + devices, including Amazon Fire TV 4K. +* DRM: + * Fix `DefaultDrmSessionManager` to correctly eagerly release preacquired + DRM sessions when there's a shortage of DRM resources on the device. +* Downloads and caching: + * Workaround platform issue that can cause a `SecurityException` to be + thrown from `Requirements.isInternetConnectivityValidated` on devices + running Android 11 + ([#9002](https://github.com/google/ExoPlayer/issues/9002)). +* DASH: + * Use identical cache keys for downloading and playing DASH segments + ([#9370](https://github.com/google/ExoPlayer/issues/9370)). + * Fix base URL selection and load error handling when base URLs are shared + across adaptation sets. +* HLS: + * Fix bug where the player would get stuck if all download attempts fail + and would not raise an error to the application + ([#9390](https://github.com/google/ExoPlayer/issues/9390)). +* RTSP: + * Handle when additional spaces are in SDP's RTPMAP atrribute + ([#9379](https://github.com/google/ExoPlayer/issues/9379)). + * Handle partial URIs in RTP-Info headers + ([#9346](https://github.com/google/ExoPlayer/issues/9346)). + * Fix RTSP Session header handling + ([#9416](https://github.com/google/ExoPlayer/issues/9416)). + * Fix RTSP WWW-Authenticate header parsing + ([#9428](https://github.com/google/ExoPlayer/issues/9428)). +* UI: + * Use `defStyleAttr` when obtaining styled attributes in + `StyledPlayerView`, `PlayerView` and `PlayerControlView` + ([#9024](https://github.com/google/ExoPlayer/issues/9024)). + * Fix accessibility focus in `PlayerControlView` + ([#9111](https://github.com/google/ExoPlayer/issues/9111)). + * Fix issue that `StyledPlayerView` and `PlayerView` don't update UI when + available player commands change. +* Cast extension: + * Implement `CastPlayer.setPlaybackParameters(PlaybackParameters)` to + support setting the playback speed + ([#6784](https://github.com/google/ExoPlayer/issues/6784)). + ### 2.15.0 (2021-08-10) * Core Library: diff --git a/constants.gradle b/constants.gradle index 6f8f060224..e016a910fb 100644 --- a/constants.gradle +++ b/constants.gradle @@ -13,8 +13,8 @@ // limitations under the License. project.ext { // ExoPlayer version and version code. - releaseVersion = '2.15.0' - releaseVersionCode = 2015000 + releaseVersion = '2.15.1' + releaseVersionCode = 2015001 minSdkVersion = 16 appTargetSdkVersion = 29 targetSdkVersion = 30 diff --git a/core_settings.gradle b/core_settings.gradle index ffee74bccf..684e688e28 100644 --- a/core_settings.gradle +++ b/core_settings.gradle @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -def rootDir = file(gradle.ext.exoplayerRoot) +def rootDir = file(".") if (!gradle.ext.has('exoplayerSettingsDir')) { gradle.ext.exoplayerSettingsDir = rootDir.getCanonicalPath() } diff --git a/demos/main/src/main/assets/media.exolist.json b/demos/main/src/main/assets/media.exolist.json index 0513dda601..7659abe5f1 100644 --- a/demos/main/src/main/assets/media.exolist.json +++ b/demos/main/src/main/assets/media.exolist.json @@ -212,6 +212,19 @@ } ] }, + { + "name": "DASH - Multiple base URLs", + "samples": [ + { + "name": "DASH - Multiple base URLs", + "uri": "https://storage.googleapis.com/exoplayer-test-media-0/dash-multiple-base-urls/manifest.mpd" + }, + { + "name": "DASH - Multiple base URLs (fail over)", + "uri": "https://storage.googleapis.com/exoplayer-test-media-0/dash-multiple-base-urls/manifest-failover.mpd" + } + ] + }, { "name": "HLS", "samples": [ diff --git a/docs/demo-application.md b/docs/demo-application.md index 4e548edb60..e9a50c34d4 100644 --- a/docs/demo-application.md +++ b/docs/demo-application.md @@ -174,7 +174,7 @@ file at `https://yourdomain.com/samples.exolist.json`, you can open it in the demo app using: ~~~ -adb shell am start -a com.android.action.VIEW \ +adb shell am start -a android.intent.action.VIEW \ -d https://yourdomain.com/samples.exolist.json ~~~ {: .language-shell} diff --git a/docs/doc/reference/allclasses-index.html b/docs/doc/reference/allclasses-index.html index 661b198996..0b597a9f2a 100644 --- a/docs/doc/reference/allclasses-index.html +++ b/docs/doc/reference/allclasses-index.html @@ -879,7 +879,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height")); BaseUrlExclusionList -
Holds the state of excluded base URLs to be used to select a base URL based on these exclusions.
+
Holds the state of excluded base URLs to be used to select a base URL based on these exclusions.
@@ -6270,7 +6270,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height")); StreamKey -
A key for a subset of media which can be separately loaded (a "stream").
+
A key for a subset of media that can be separately loaded (a "stream").
diff --git a/docs/doc/reference/com/google/android/exoplayer2/ForwardingPlayer.html b/docs/doc/reference/com/google/android/exoplayer2/ForwardingPlayer.html index ec8d4c572d..2d40c14602 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/ForwardingPlayer.html +++ b/docs/doc/reference/com/google/android/exoplayer2/ForwardingPlayer.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":42,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":42,"i57":10,"i58":42,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":42,"i72":10,"i73":10,"i74":10,"i75":42,"i76":10,"i77":10,"i78":10,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10,"i85":10,"i86":10,"i87":10,"i88":10,"i89":10,"i90":10,"i91":10,"i92":10,"i93":10,"i94":10,"i95":10,"i96":10,"i97":10,"i98":10,"i99":10,"i100":10,"i101":10,"i102":10,"i103":10,"i104":10,"i105":10,"i106":10,"i107":10,"i108":10,"i109":10,"i110":10,"i111":10}; +var data = {"i0":42,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":42,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":42,"i58":10,"i59":42,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":42,"i73":10,"i74":10,"i75":10,"i76":42,"i77":10,"i78":42,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10,"i85":10,"i86":10,"i87":10,"i88":10,"i89":10,"i90":10,"i91":10,"i92":10,"i93":10,"i94":10,"i95":10,"i96":10,"i97":10,"i98":10,"i99":10,"i100":10,"i101":10,"i102":10,"i103":10,"i104":10,"i105":10,"i106":10,"i107":10,"i108":10,"i109":10,"i110":10,"i111":10,"i112":42}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -219,7 +219,7 @@ implements void addListener​(Player.EventListener listener) -
Registers a listener to receive events from the player.
+
Deprecated.
@@ -628,13 +628,20 @@ implements +Player +getWrappedPlayer() + +
Returns the Player to which operations are forwarded.
+ + + boolean hasNext()
Deprecated.
- + boolean hasNextWindow() @@ -642,14 +649,14 @@ implements + boolean hasPrevious()
Deprecated.
- + boolean hasPreviousWindow() @@ -657,21 +664,21 @@ implements + void increaseDeviceVolume()
Increases the volume of the device.
- + boolean isCommandAvailable​(int command)
Returns whether the provided Player.Command is available.
- + boolean isCurrentWindowDynamic() @@ -679,14 +686,14 @@ implements + boolean isCurrentWindowLive()
Returns whether the current window is live, or false if the Timeline is empty.
- + boolean isCurrentWindowSeekable() @@ -694,35 +701,35 @@ implements + boolean isDeviceMuted()
Gets whether the device is muted or not.
- + boolean isLoading()
Whether the player is currently loading the source.
- + boolean isPlaying()
Returns whether the player is playing, i.e.
- + boolean isPlayingAd()
Returns whether the player is currently playing an ad.
- + void moveMediaItem​(int currentIndex, int newIndex) @@ -730,7 +737,7 @@ implements Moves the media item at the current index to the new index. - + void moveMediaItems​(int fromIndex, int toIndex, @@ -739,70 +746,70 @@ implements Moves the media item range to the new index. - + void next()
Deprecated.
- + void pause()
Pauses playback.
- + void play()
Resumes playback as soon as Player.getPlaybackState() == Player.STATE_READY.
- + void prepare()
Prepares the player.
- + void previous()
Deprecated.
- + void release()
Releases the player.
- + void removeListener​(Player.EventListener listener) -
Unregister a listener registered through Player.addListener(EventListener).
+
Deprecated.
- + void removeListener​(Player.Listener listener)
Unregister a listener registered through Player.addListener(Listener).
- + void removeMediaItem​(int index)
Removes the media item at the given index of the playlist.
- + void removeMediaItems​(int fromIndex, int toIndex) @@ -810,21 +817,21 @@ implements Removes a range of media items from the playlist. - + void seekBack()
Seeks back in the current window by Player.getSeekBackIncrement() milliseconds.
- + void seekForward()
Seeks forward in the current window by Player.getSeekForwardIncrement() milliseconds.
- + void seekTo​(int windowIndex, long positionMs) @@ -832,35 +839,35 @@ implements Seeks to a position specified in milliseconds in the specified window. - + void seekTo​(long positionMs)
Seeks to a position specified in milliseconds in the current window.
- + void seekToDefaultPosition()
Seeks to the default position associated with the current window.
- + void seekToDefaultPosition​(int windowIndex)
Seeks to the default position associated with the specified window.
- + void seekToNext()
Seeks to a later position in the current or next window (if available).
- + void seekToNextWindow() @@ -868,14 +875,14 @@ implements + void seekToPrevious()
Seeks to an earlier position in the current or previous window (if available).
- + void seekToPreviousWindow() @@ -883,21 +890,21 @@ implements + void setDeviceMuted​(boolean muted)
Sets the mute state of the device.
- + void setDeviceVolume​(int volume)
Sets the volume of the device.
- + void setMediaItem​(MediaItem mediaItem) @@ -905,7 +912,7 @@ implements + void setMediaItem​(MediaItem mediaItem, boolean resetPosition) @@ -913,7 +920,7 @@ implements Clears the playlist and adds the specified MediaItem. - + void setMediaItem​(MediaItem mediaItem, long startPositionMs) @@ -921,7 +928,7 @@ implements Clears the playlist and adds the specified MediaItem. - + void setMediaItems​(List<MediaItem> mediaItems) @@ -929,7 +936,7 @@ implements + void setMediaItems​(List<MediaItem> mediaItems, boolean resetPosition) @@ -937,7 +944,7 @@ implements Clears the playlist and adds the specified MediaItems. - + void setMediaItems​(List<MediaItem> mediaItems, int startWindowIndex, @@ -946,56 +953,56 @@ implements Clears the playlist and adds the specified MediaItems. - + void setPlaybackParameters​(PlaybackParameters playbackParameters)
Attempts to set the playback parameters.
- + void setPlaybackSpeed​(float speed)
Changes the rate at which playback occurs.
- + void setPlaylistMetadata​(MediaMetadata mediaMetadata)
Sets the playlist MediaMetadata.
- + void setPlayWhenReady​(boolean playWhenReady)
Sets whether playback should proceed when Player.getPlaybackState() == Player.STATE_READY.
- + void setRepeatMode​(int repeatMode)
Sets the Player.RepeatMode to be used for playback.
- + void setShuffleModeEnabled​(boolean shuffleModeEnabled)
Sets whether shuffling of windows is enabled.
- + void setVideoSurface​(Surface surface)
Sets the Surface onto which video will be rendered.
- + void setVideoSurfaceHolder​(SurfaceHolder surfaceHolder) @@ -1003,38 +1010,40 @@ implements + void setVideoSurfaceView​(SurfaceView surfaceView)
Sets the SurfaceView onto which video will be rendered.
- + void setVideoTextureView​(TextureView textureView)
Sets the TextureView onto which video will be rendered.
- + void setVolume​(float audioVolume)
Sets the audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
- + void stop()
Stops playback without resetting the player.
- + void stop​(boolean reset) -  + +
Deprecated.
+
@@ -384,12 +418,13 @@ implements Creates an instance.
Parameters:
periodIndex - The period index.
groupIndex - The group index.
-
trackIndex - The track index.
+
streamIndex - The stream index.
diff --git a/docs/doc/reference/com/google/android/exoplayer2/offline/package-summary.html b/docs/doc/reference/com/google/android/exoplayer2/offline/package-summary.html index d7a075abe0..ce9db43d20 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/offline/package-summary.html +++ b/docs/doc/reference/com/google/android/exoplayer2/offline/package-summary.html @@ -263,7 +263,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
StreamKey -
A key for a subset of media which can be separately loaded (a "stream").
+
A key for a subset of media that can be separately loaded (a "stream").
diff --git a/docs/doc/reference/com/google/android/exoplayer2/source/dash/BaseUrlExclusionList.html b/docs/doc/reference/com/google/android/exoplayer2/source/dash/BaseUrlExclusionList.html index 91eaaad68d..124bad9534 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/source/dash/BaseUrlExclusionList.html +++ b/docs/doc/reference/com/google/android/exoplayer2/source/dash/BaseUrlExclusionList.html @@ -131,7 +131,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
public final class BaseUrlExclusionList
 extends Object
-
Holds the state of excluded base URLs to be used to select a base URL based on these exclusions.
+
Holds the state of excluded base URLs to be used to select a base URL based on these exclusions.
diff --git a/docs/doc/reference/com/google/android/exoplayer2/source/dash/DashUtil.html b/docs/doc/reference/com/google/android/exoplayer2/source/dash/DashUtil.html index 6ffa975c31..66e631b456 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/source/dash/DashUtil.html +++ b/docs/doc/reference/com/google/android/exoplayer2/source/dash/DashUtil.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9}; +var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -163,9 +163,9 @@ extends static DataSpec -buildDataSpec​(String baseUrl, +buildDataSpec​(Representation representation, + String baseUrl, RangedUri requestUri, - String cacheKey, int flags)
Builds a DataSpec for a given RangedUri belonging to Representation.
@@ -236,6 +236,14 @@ extends Loads initialization data for the representation and returns the sample Format. + +static String +resolveCacheKey​(Representation representation, + RangedUri rangedUri) + +
Resolves the cache key to be used when requesting the given ranged URI for the given Representation.
+ +