This CL adds the fundamental pieces for ExoPlayer/Cast integration and includes a
demo app to showcase this functionality. However, media queues should be supported
in the first release of this extension.
Issue:#2283
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165576892
It's needed in multiple places. MediaSessionConnector uses it
today. Our leanback connector will also use it. Maybe
SimpleExoPlayerView should use one too, to show the message to
the user when an error occurs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164720020
Also mark all ads as played when the postroll plays, in the case the
player is backgrounded then resumed and the user seeks back.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164262738
I think they're excessively sized also, but changing that
is a little more risky. And we should look at investigating
the input buffer size for all our decoder extensions,
rather than just this one.
Issue: #3120
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164234087
Multiple timelines work as a wrapper around another timeline and forward
most of the method calls to the wrapped timeline. Added a base class meant to
be overridden which handles all the boiler-plate forwarding.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164117264
The manifest value is always overridden in gradle builds,
so this is for internal builds only. The value should be
the same (i.e. 25!).
Also fix IMA build to force the right support library
version, attempt 2!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164103183
- Fix Ogg extractor to work without sniffing.
- Fix extractors to handle seek() before init().
- Add tests for both issues.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163992343
- Publish IMA extension
- Force IMA to use the correct version of the support library
- Add missing sr translations for repeat mode strings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163705883
Also don't detach any attached player in release() to prevent a possible
NullPointerException if ImaAdsLoader.release() runs first, then the MediaSource
is released and detaches the player. This is safe because if the loader was
attached it's guaranteed to be detached.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163673750
SKIPPED can't be handled as CONTENT_RESUME_REQUESTED because after skipping an
ad there may be further ads to play in its ad group.
Remove workaround for handling unexpected playAd without stopAd, as the player
can instead recover when IMA sends CONTENT_RESUME_REQUESTED. This in turn fixes
handling of the case where playAd is called twice but IMA expects only the
first ad to play, when skipping a particular ad. (Add an ad tag where this
occurs to internal samples.)
Check whether a currently playing ad has been marked as played in
ExoPlayerImplInternal, and handle this case as a seek. This ensures that any
loaded ad periods are discarded in the case of CONTENT_RESUME_REQUESTED.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162610621
- Drop minimum version to new RTMP min version
- Publish the extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162477200
Store playWhenReady when playAd is called, and restore it if necessary when the
content resumes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162471616
This is the first step towards facilitating Cast integration to ExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162366198
Remove assertions in pauseAd()/playAd(), which can fail if events are delivered
after detaching the player, and log warnings instead.
Use whether IMA has sent CONTENT_PAUSE_REQUESTED/CONTENT_RESUME_REQUESTED to
determine whether we pause/resume the AdsManager, matching the IMA
documentation.
Also clean up use of player.isPlayingAd vs playingAd.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162364751
The FakeClock allows to simulate timing behaviour including sleep time
for test cases.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162345258
This is possible to do without passing the player instance to
custom action providers through their constructors, given we
no longer have a MuteActionProvider. Passing the player through
the constructors generalizes better to such cases, however, so
feels like the right thing to do.
It's also possible to use generics and keep passing the player
instance via the CustomActionProvider methods, but this adds
some unnecessary complexity.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162333043
Note: Wont work quite yet; we need to actually do a
release for the instructions to become effective.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162220939
We want to experiment with a direct executor to avoid thread hops between the
network thread and the response handling thread. This change is needed to do
so.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161812382
adsLoader.contentComplete was called twice which led to postrolls not seeing
the STARTED event.
Also make the onPositionDiscontinuity handler easier to follow by renaming
variables, and remove the adGroupIndex field.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161537765