Also add explicit Lint.IfChange/ThenChange rules to make it
clearer what needs to be done when changing one of the code
paths that's accessed via reflection.
PiperOrigin-RevId: 233406709
Switch from passing an ad UI ViewGroup to passing an object that can also
provide information about controls overlays.
Also switch to using a dedicated overlay for ads instead of the overlay frame
layout, which apps have easy access to.
PiperOrigin-RevId: 233393500
Given the change to require setPlayer on AdsLoaders, it seems like a good
opportunity to clean up deprecated ads-related symbols.
PiperOrigin-RevId: 233020171
It better describes what the class does. More importantly, we've had
inconsistent class names since we added offline support, for which we
added ProgressiveDownloader ("ExtractorDownloader" doesn't make any
sense). We could really do with aligning the names for clarity.
(Sorry)
PiperOrigin-RevId: 231387268
The combination of pre-16 API levels accounting for ~0.5% of the device
population, and that the most important components in ExoPlayer (e.g.
the MediaCodec renderers) have always required API level 16, mean it's
very unlikely this will negatively impact on anyone.
PiperOrigin-RevId: 230701808
That's the same position set in MediaPeriod.prepare (where it may be removed
in the future).
Having the position at an earlier point is necessary to fix an
issue with lazy preparation in ConcatenatingMediaSource where the prepare
position was assumed to be known but MediaPeriod.prepare hasn't been called
yet.
Issue:#5350
PiperOrigin-RevId: 229756637
There were some edge cases in which we'd forget to release DRM
sessions. For example if we read a format and acquired a
pendingDrmSession (in onInputFormatChanged), then immediately
read another format and overwrote pendingDrmSession, we'd
forget to release the one that's been overwritten.
This change hopefully makes release much clearer. We keep a list
of all drm sessions we're currently holding. Whenever we update
either drmSession or pendingDrmSession, we release any other
sessions that are in the list.
PiperOrigin-RevId: 228905465
They are not longer needed anywhere, are error-prone (because of threading
requirements), and complicate testing and using MediaSources without a player.
PiperOrigin-RevId: 227871157
Also configure the FFmpeg context to ignore errors as far as possible (this
appears to have an effect only for certain decoders).
Issue: #5293
PiperOrigin-RevId: 227851397
Passing the player through MediaSource.prepare is only needed for the AdsLoader
and complicates other usages of MediaSource. Providing the player directly to
the AdsLoader is also in line with the usage pattern of PlayerView and other
components.
Also rename methods to start/stop to better reflect their usage.
PiperOrigin-RevId: 227682112
- 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
- Make units of time clear for seeking
- Remove option to specify supported repeat modes in default
playback controller. It doesn't seem useful, given we can't
control what the session is sent.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220464529