mirror of
https://github.com/androidx/media.git
synced 2025-05-16 20:19:57 +08:00
Use loading period event time for fatal load errors.
ExoPlaybackExceptions of type SOURCE are always associated with the loading period and thus we can use the event time for the loading period in onPlayerError. Renderer and unexpected exceptions are still associated with the currently playing period. Issue:#5407 PiperOrigin-RevId: 230216253
This commit is contained in:
parent
e671dac9a2
commit
923aa420df
@ -43,6 +43,9 @@
|
||||
fit service requirements. Remove ability to set a custom stop action.
|
||||
* Add workaround for video quality problems with Amlogic decoders
|
||||
([#5003](https://github.com/google/ExoPlayer/issues/5003)).
|
||||
* Associate fatal player errors of type SOURCE with the loading source in
|
||||
`AnalyticsListener.EventTime`
|
||||
([#5407](https://github.com/google/ExoPlayer/issues/5407)).
|
||||
|
||||
### 2.9.4 ###
|
||||
|
||||
|
@ -488,7 +488,10 @@ public class AnalyticsCollector
|
||||
|
||||
@Override
|
||||
public final void onPlayerError(ExoPlaybackException error) {
|
||||
EventTime eventTime = generatePlayingMediaPeriodEventTime();
|
||||
EventTime eventTime =
|
||||
error.type == ExoPlaybackException.TYPE_SOURCE
|
||||
? generateLoadingMediaPeriodEventTime()
|
||||
: generatePlayingMediaPeriodEventTime();
|
||||
for (AnalyticsListener listener : listeners) {
|
||||
listener.onPlayerError(eventTime, error);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user