This error marks the current ad group as unplayable.
Issue: #3801
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185663472
Also make ad group skipping more robust. After calling onError for an ad, IMA
will sometimes trigger an ad group load error, so this needs to be handled in a
way that allows some ads to be loaded already for the ad group.
This change also fixes calculation of the expected ad index to take into account
whether the position is being faked to trigger loading an ad or is the actual
player position.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185655844
IMA's cue points may not be in order, so sort them. It looks like IMA events use
time ordered ad indices, so it is not necessary to map between the original cue
point order and the time order.
Issue: #3716
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185495798
There are 4 tests which can't currently be moved:
- DownloadManagerTest explicitly uses the main looper which isn't easily
supported because the test runs on this thread.
- ContentDataSourceTest uses an AssetFileDescriptor which wraps a
ParcelFileDescriptor. It seems Robolectric doesn't correctly forward the
inner wrapped file descriptor leading to NPE.
- CacheContentIndexTest and SimpleCacheSpanTest both work fine with Gradle
but fail with seemingly valid test failures on Blaze.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185366678
We now build one .so file for the opus extension in the
internal build, so make the external build work the same way.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184962896
Allow skipping an ad group when requested by IMA, even if we aren't currently
playing one, to handle cases where no ads in an ad group will load (so IMA
requests resuming content but we never managed to start playing an ad).
Use the known ad group index (rather than the expected one) when handling ad
group load errors. This ensures we skip the right ad group if we notify IMA of
playback errors for every ad in the ad group, then IMA notifies that the ad
group is empty via a load error.
Also make some other miscellaneous small fixes to ads code:
- Avoid warning about unexpected ad group indices more than once.
- Output a warning if the ad count in an ad group decreases.
- Remove unnecessary assertion.
- Fix getting the ad duration for ad indices that haven't loaded yet.
- Allow setting an ad group state to its current value.
- Fix javadoc for setting the ad resume position.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184831495
The ad index in the ad group may need to skip over ads that failed to load, so
it can't just be incremented any more.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184812556
When using cronet data source, calling read after the end of input has
been read will trigger this.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184667794
If IMA loads an empty VAST document for an ad group it notifies via a LOG
AdEvent. Handle the event by updating the AdPlaybackState accordingly.
The error state will be handled in ExoPlayerImplInternal in a separate change.
Issue: #3584
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184516585
The pending exception will be thrown upon returning to Java
from native, but we should return early rather than continuing
to execute the native method to the end so as to avoid undefined
behavior. Note that the return value is irrelevant (because the
pending exception will be thrown).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184119606
Lint recommends switching to SparseArray<X> instead.
This is done for the DASH case. For the Cast case it's
easier to use a switch statement.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184119312
*** Reason for rollback ***
Broke everything
*** Original change description ***
Clean up message naming in EPII
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184061352
Simplifies the app and prevents inconsistent states between
both players and the media queue.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183831329
Before this change, the ad playback state stored the number of played ads in
each ad group. There was no way to represent that an ad had failed to load (and
it wouldn't be possible just to increment the played ad count to signal a load
error because there might be an unplayed ad before the ad that failed to load).
Represent the state of each ad (unavailable, available, skipped, played, error)
in each ad group. In a later change the player will use this information to
update its loaded MediaPeriods in response to future ads failing to load.
Also make the AdPlaybackState immutable and remove copying/duplication of its
fields in the ad timeline and period.
Issue: #3584
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183655308
For our strings to be translated, we're required to provide
added context in the form of a description, and specify a
maximum length for the translated strings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183651515
1. When we try and load something via reflection and find the
class, always throw rather than failing silently if we
subsequently fail to instantiate an instance. This is
indicative of a broken proguard setup, and failing silently
makes it hard to spot.
2. Add library/core proguard configuration to ensure extension
renderer constructors that we access via reflection are kept.
3. Add demos/main proguard configuration to ensure ImaAdsLoader
constructor that we access via reflection is kept.
4. Added IMA proguard file to hopefully fix#3723, although I
wasn't actually able to reproduce the issue.
Issue: #3723
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183648187
This removes some boiler-plate code for compostite sources and will also
simplify resuing media source in the future (because this class can keep track
of child listeners).
Issue:#3498
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183387123
Try to delay failure for as long as possible. That is, propagate
DRM session failures only after an encrypted buffer arrives or clear
sample playback without session is not allowed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183076348
Track the expected next ad group index so that it can be used as a fallback if
IMA does not notify the ad index via a LOADED event.
Also do some miscellaneous minor cleanup (including logging all LOG events, and
logging at debug level where appropriate).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183048612
This achieves two things:
1. All our tests use the same type of assertions.
2. The tests currently run as instrumentation test can be moved to
Robolectric without changing the assertions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182910542
- In IDLE, the button will now call a preparer. This allows
removal of the separate retry button from the demo app.
- In ENDED, the button will seek back to the default position
and play.
- Behavior is made consistent with LeanbackPlayerAdapter.
Issue: #3689
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182506855
This is a Scheduler implementation which uses Firebase JobDispatcher.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182051350
Android NDK r9 in [] is deprecated (see []
Update the ExoPlayer flac extensions to use android_jni_library.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182017669
Make LibvpxVideoRenderer non-final and add protected methods to match
MediaCodecVideoRenderer.
Reorganize methods to separate BaseRenderer, protected and internal methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181320714
Partial reads were performed once using a partial size of 1 byte.
This was not enough to detect problems which only occur in combination
with IOExceptions. Partial reads are now only applied when no exception
is thrown.
Moreover, the tests didn't check whether the total number of sampled bytes
is what it is supposed to be. Added a field to the data dumps checking
the total number of bytes in the sampled data.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181296545
Some readability fixes for PlayerMessage and the handling in
ExoPlayerImplInternal.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180544294
This adds options to ExoPlayer.sendMessages which allow to specify a window index
and position at which the message should be sent. Additionally, the options can be
configured to use a custom Handler for the messages and whether the message should
be repeated when playback reaches the same position again.
The internal player converts these window positions to period index and position
at the earliest possibility. The internal player also attempts to update these
when the source info is refreshed. A sorted list of pending posts is kept and the
player triggers these posts when the playback position moves over the specified
position.
Issue:#2189
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179683841
*** Original change description ***
Add possiblity to send messages at playback position.
This adds options to ExoPlayer.sendMessages which allow to specify a window index
and position at which the message should be sent. Additionally, the options can be
configured to use a custom Handler for the messages and whether the message should
be repeated when playback reaches the same position again.
The internal player converts these window positions to period index and position
at the earliest possibility. The internal player also at...
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179666357
This adds options to ExoPlayer.sendMessages which allow to specify a window index
and position at which the message should be sent. Additionally, the options can be
configured to use a custom Handler for the messages and whether the message should
be repeated when playback reaches the same position again.
The internal player converts these window positions to period index and position
at the earliest possibility. The internal player also attempts to update these
when the source info is refreshed. A sorted list of pending posts is kept and the
player triggers these posts when the playback position moves over the specified
position.
Issue:#2189
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179563355
Previously the ad/content progress updates were toggled based on whether the
player was playing ads or content. After this change, we switch based on
whether playAd/stopAd has been called instead.
This seems to resolve an issue where occasionally the player would get stuck at
the start of an ad, but as I don't have a root cause for that issue and it's
only sporadically reproducible I'm not certain this is a reliable fix.
Issue: #3525
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179169296