- This is for consistency with PlayerControlView.
- Also update PlayerNotificationManager notification if shuffle
mode changes. This is for consistency with what happens when
the repeat mode changes. By default the notification will be
unchanged, but custom implementations can extend and then
override createNotification, and given these modes change
infrequently it feels like we can just do this. The alternative
for achieving consistency would be to remove handling of repeat
mode changes.
Issue: #6582
PiperOrigin-RevId: 277925094
Also remove it from all tests, these aren't covered by the null-checker
Covered by the following package-info.java files:
- j/c/g/a/exoplayer2/ext/mediasession/package-info.java
- j/c/g/a/exoplayer2/package-info.java
- j/c/g/a/exoplayer2/offline/package-info.java
- j/c/g/a/exoplayer2/video/package-info.java
- j/c/g/a/exoplayer2/ui/package-info.java
PiperOrigin-RevId: 277038916
It's confusing that seekTo(player, windowIndex, positionMs) does
clamping, because it only makes sense if windowIndex is the current
window.
Note: This doesn't actually fix anything (other than code clarity).
In cases where we were passing other windowIndices, we always
passed 0 as the position and so the clamping logic wouldn't have
had any effect.
PiperOrigin-RevId: 272857104
The playback speed set in MediaSession's PlaybackStateCompat needs to be the
actual speed at which the playback position progresses and not the user-defined
target speed.
This fixed a bug where the position advances although the player lost audio
focus.
Issue:#6203
PiperOrigin-RevId: 269295249
This new annotation declares everything as non-null by default and can be
used as a package annotation in package-info.java.
In this change the core lib offline package and the mediasession extension is
annotated that way as initial example usage.
PiperOrigin-RevId: 260894548
- Remove manifest argument from callbacks of Player.EventListener and
SourceInfoRefreshListener. Instead make it accessible through
Player.getCurrentManifest() and Timeline.Window.manifest.
- Fix all MediaSource implementation to include the manifest in the
Timeline instead of passing it to the SourceInfoRefreshListener.
- Refactor ExoPlayerTestRunner, FakeTimeline, FakeMediaSource to
reflect these changes and make tests pass.
PiperOrigin-RevId: 257359662
Before this change we'd release the audio track and create a new one as soon
as audio processors had drained when reconfiguring.
Fix this behavior by stop()ing the AudioTrack to play out all written data.
Issue: #2446
PiperOrigin-RevId: 244812402
The old domain automatically forwards to the new one. For consistency, change
all doc and code references regardless.
Also adds GitHub CNAME config file which configures our page for the custom
domain.
PiperOrigin-RevId: 243592110
- This brings it in line with PlayerControlView. The play action is displayed
instead, and pressing it seeks to the default position of the current window.
- Do the same for MediaSessionConnector
- Add support for PlaybackPreparer consistent with PlayerControlView
Issue: #5072
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221076008
The extension cannot be used without also using support-media-compat
(e.g. to instantiate a MediaSessionCompat). So it may as well be an
API dependency.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221072128
This change also paves the way for splitting out functionality into a utility class.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221070262
- Make MediaSessionConnector use a ControlDispatcher and add setControlDispatcher,
setFastForwardIncrementMs and setRewindIncrementMs methods. This brings it in line
with our other UI components, including PlayerControlView and
PlayerNotificationManager.
- Collapsed DefaultPlaybackController into MediaSessionConnector, since I'm not
sure there's a legitimate alternative implementation (note ControlDispatcher does
provide some equivalent functionality e.g. to modify calls being made on the
player).
- Pass the Player and ControlDispatcher to command receivers and custom actions,
so they don't need their own references.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220822082
- Simplify logic for dispatching to the rating callback
- Simplify CommandReceiver by removing getCommands. Simply calling
receivers is simpler, and more flexible because it doesn't force
implementations to define a static set of things that they handle
up front.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220788423