use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onDrmKeysRemoved.
@Override
public final void onDrmKeysRemoved(int windowIndex, @Nullable MediaPeriodId mediaPeriodId) {
EventTime eventTime = generateMediaPeriodEventTime(windowIndex, mediaPeriodId);
sendEvent(eventTime, AnalyticsListener.EVENT_DRM_KEYS_REMOVED, listener -> listener.onDrmKeysRemoved(eventTime));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onMediaMetadataChanged.
@Override
public void onMediaMetadataChanged(MediaMetadata mediaMetadata) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_MEDIA_METADATA_CHANGED, listener -> listener.onMediaMetadataChanged(eventTime, mediaMetadata));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onSeekProcessed.
// Implementing and calling deprecated listener method.
@SuppressWarnings("deprecation")
@Override
public final void onSeekProcessed() {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(eventTime, /* eventFlag= */
C.INDEX_UNSET, listener -> listener.onSeekProcessed(eventTime));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onAudioCodecError.
@Override
public final void onAudioCodecError(Exception audioCodecError) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_AUDIO_CODEC_ERROR, listener -> listener.onAudioCodecError(eventTime, audioCodecError));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onVideoDisabled.
@Override
// Calling deprecated listener method.
@SuppressWarnings("deprecation")
public final void onVideoDisabled(DecoderCounters counters) {
EventTime eventTime = generatePlayingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_VIDEO_DISABLED, listener -> {
listener.onVideoDisabled(eventTime, counters);
listener.onDecoderDisabled(eventTime, C.TRACK_TYPE_VIDEO, counters);
});
}
Aggregations