*** Original commit ***
Rollback of 8ed6c9fcf5
*** Original commit ***
Fix capitalization of language in track selector
Issue: #9452
***
***
PiperOrigin-RevId: 400942287
TracksInfo is very similar to
`MappingTrackSelector.MappedTracksInfo` with some
fields removed to simplify the Player API,
notably it doesn't expose the renderer concept.
A significant difference is the addition of a `selected` boolean
field which avoids having a separate `getCurrentTrackSelection`
API.
This cl is a part of the bigger track selection change,
splitted for ease of review.
In particular, the MediaSession implementation and UI usage
have been slitted in child cls.
Find all cls with the tag:
#player-track-selection
PiperOrigin-RevId: 400937124
- Fix focus when pausing and resuming
- Prevent repeated readout of the playback position when paused
#exofixit
#minor-release
Issue #9111
PiperOrigin-RevId: 395301765
- Android 12 will not allow our download service to be
restarted from the background when conditions that
allow downloads to continue are met. As an interim
(and possibly permanent) solution, we'll keep the
service in the foreground if there are unfinished
downloads that would continue if conditions were met.
- Keeping the service in the foreground requires a
foreground notification. Hence we need to be able to
generate a meaningful notification for this state.
PiperOrigin-RevId: 391969986
StyledPlayerControlView was checking whether the player is an ExoPlayer
instance to set the track selector. This means that, if apps were
wrapping an ExoPlayer in a ForwardingPlayer (to replace a
ControlDispatcher for example), the track selector wasn't set anymore.
#minor-release
PiperOrigin-RevId: 391776305
The dokka javadoc generation tool complains when parameter names don't match between a method and its override. This change updates occurrences where there is currently a mismatch.
Notable renamings that might be controversial:
- `onPlaybackStateChanged(int state)` to `onPlaybackStateChanged(int playbackState)` affected a lot of lines but seems more consistent with other '-Changed' methods.
- `handleMessage(int messageType, Object payload)` to `handleMessage(int messageType, Object message)`
- `ExtractorInput` and `DataSource` inherit `DataReader` which had `read(byte[] target, ...`, while data sources normally called the first parameter `buffer`. I have standardized these all to use `buffer` even though it looks out of place in the `ExtractorInput` interface (which has more `read` methods with `target`).
PiperOrigin-RevId: 387290360
When the size of the video is unknown,
PlayerView and StyledPlayerView set the aspect ratio as 1,
which could result in wrong view layout.
This CL sets the aspect ratio as 0 (unset) to prevent that.
This handles Issue: #9189.
PiperOrigin-RevId: 385115357
This values won't be configurable from the UI anymore once the
DefaultControlDispatcher is removed.
They can be configured in the Player or by using a ForwardingPlayer.
PiperOrigin-RevId: 385113498
PlayerView and StyledPlayerView handled this in
onVideoSizeChanged but it can be omitted.
(e.g. if the player is MediaController)
PiperOrigin-RevId: 382340927
The glitches were introduced in:
https://github.com/google/ExoPlayer/commit/6c31e34528
The problem is that Listener.onEvents is called in a later looper iteration
than the listener methods that were previously used. This created a gap on
the main thread between the UI component dispatching a seek operation to the
player, and onEvents being called to update the progress bar's position.
At the start of this gap the progress bar is rendering the new position,
but its position member variable is still set to the old position. If the
progress bar is re-drawn by another message on the main thread within the
gap, it will briefly show the old position until onEvents is called.
There are multiple possible fixes to this, and the best one is probably to
modify ListenerSet to remove the gap. That's high risk though, so for now we
fix the flicker by always updating the progress immediately after the seek
is dispatched, in addition to when onEvents is called.
Issue: #9049
#minor-release
PiperOrigin-RevId: 380678388