The 'implementation' dependency causes problems when resolving
ListenableFuture in contexts that also include the
com.google.guava:listenablefuture:1.0 dependency.
Issue: #7905
Issue: #7997
Issue: #7993
PiperOrigin-RevId: 337093024
This will reduce the amount of boilerplate required to pass the configuration
values around (especially in a planned future change when logic is factored out
of ImaAdsLoader).
PiperOrigin-RevId: 337058355
This is in preparation for supporting playlists of ads media sources using
ImaAdsLoader.
Existing ways of passing ad tags should still function but are deprecated (and
won't be supported with playlists).
Issue: #3750
PiperOrigin-RevId: 335618364
On receiving a fetch error for an ad that would otherwise play based on an
initial/seek position, the pending content position wasn't cleared which meant
that position reporting was broken after a fetch error. Fix this by always
clearing the pending position (if there was a pending position that will have
triggered the fetch error).
Also deduplicate the code for handling empty ad groups (fetch errors)
and ad group load errors.
Issue: #7956
PiperOrigin-RevId: 334113131
Since gradle 4.0, CMake imported libraries are bundled in the APK, so
manually bundling them causes a duplication which breaks the build.
Issue: #7906
PiperOrigin-RevId: 332012375
This is useful because ImaAdsLoader.getAdsLoader() can now return null
(before ads have been requested), and it avoids the app needing to get
an AdsManager to attach its listener.
PiperOrigin-RevId: 330907051
- Use a setter, which is consistent with how other optional
components are passed.
- Remove nesting where a provider provides another provider.
Since AdSupportProvider then only provides one thing, it
can be renamed to AdsLoaderProvider, which more clearly
expresses what it provides.
PiperOrigin-RevId: 330396334
This brings SessionPlayerConnector in line with other
components that use a ControlDispatcher in the ExoPlayer
library, all of which have a setter.
PiperOrigin-RevId: 329665767
To play slow motion streams where the audio has been recorded at
slower speeds, it is necessary to be able to resample (rather than
time-stretch) the audio. This change undeprecates back the previously
deprecated PlaybackParameters class to allow apps to set pitch.
PiperOrigin-RevId: 328703116
Before this CL, SessionPlayerConnector getters had returned
UNKNOWN_TIME in idle state. It was because
SessionPlayerConnector had followed AndroidX media2
MediaPlayer's behavior, which was the baseline code of the
SessionPlayerConnector.
With this CL, SessionPlayerConnector getters directly return
underlying Player's value, rather than considering calls
in IDLE state as an exception and fallbacks to the default
UNKNOWN_TIME.
PiperOrigin-RevId: 327420940
ExoPlayer is now the trusted source of playlist and can be
used by other components without breaking
SessionPlayerConnector's cached playlist.
PiperOrigin-RevId: 327266929
Playlist can now be obtained directly from Timeline windows
in any state. So make ExoPlayer as the trusted source of
playlist, instead of SessionPlayerConnector.
PlayerWrapper still need to keep the list of media items.
It's used to detect whether the Timeline change is caused by
changes in media items or not, and only notify
SessionPlayer.PlayerCallback#onPlaylistChanged() only when
the playlist is really changed.
PiperOrigin-RevId: 327231820
MediaSession requires prepared Looper in 1.0.3-stable release,
which is the latest stable release for now.
The requirement would be removed in 1.1.0-stable, but workaround
is needed meanwhile.
PiperOrigin-RevId: 327220042
This allows us to more easily create different dumps derived from the
same assets.
This moves media/source files from `assets/` to `assets/media/` and
dump files from `assets/` to `assets/extractordumps/` and
`assets/audiosinkdumps/` as appropriate. I intend to add
`assets/playbackdumps/` in a future CL.
PiperOrigin-RevId: 326986283
- Applications should generally use DefaultMediaSourceFactory,
or their own custom implementation if they need one. Having the
media2 extension implement its own version directly doesn't seem
that useful.
- Remove support for CallbackMediaItem. This type of MediaItem
doesn't go cross-process, and it seems like there would never
be a use case where an app would need to generate one locally.
If an app needs to provide data from a custom source, it should
hook into ExoPlayer's way of doing this (i.e., use a UriMediaItem
with a custom scheme, and inject a custom DataSource that can
handle this scheme).
PiperOrigin-RevId: 326914465
- Use ExoPlayer DataSource instrumentation to intercept reads
- Use ExoPlayer Resource URIs
- Use ExoPlayer DefaultMediaSourceFactory
PiperOrigin-RevId: 326912324
PlayerWrapper throws Exception if getters is called in the
STATE_IDLE. In that case, log may print 50+ lines of stack
traces. It's verbose and can be considered as serious issue.
This CL include folloing changes
- Change to use ExoPlayer's log class
- Adjust log level, because it would be consumed by caller
- Leave log when the debug flag is turned on.
Another CL will remove exceptions between PlayerWrapper and
and SessionPlayerConnector, not to use Exception for ordinary
control flow as the Effective Java suggests.
PiperOrigin-RevId: 326614559
Even after this change, it's unclear to me why we need so many
assets for these tests. Just doing a minimal pass for now though!
PiperOrigin-RevId: 326613941
Being specific, this includes following changes
- Remove PlaylistManager and TimelinePlaylistManager
and use Player's playlist API directly.
- Replace ConcatenatingMediaSource uses with
ExoPlayer MediaItem.
- Replace PlaybackPreparer uses with Player#prepare()
- Add MediaItemConverter for developers to customize
converting AndroidX MediaItems to ExoPlayer MediaItems
and vice-versa.
- Add DefaultMediaItemConverter for providing default
implementation of both MediaItemConverter
and MediaSourceFactory.
Note that removing PlaylistManager loses the ability
to suppress individual playlist API. But decided to remove
for simpler API set. The feature can be added back later
via explicit request.
PiperOrigin-RevId: 326463492