use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onRepeatModeChanged.
@Override
public final void onRepeatModeChanged(@Player.RepeatMode int repeatMode) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_REPEAT_MODE_CHANGED, listener -> listener.onRepeatModeChanged(eventTime, repeatMode));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onDrmSessionReleased.
@Override
public final void onDrmSessionReleased(int windowIndex, @Nullable MediaPeriodId mediaPeriodId) {
EventTime eventTime = generateMediaPeriodEventTime(windowIndex, mediaPeriodId);
sendEvent(eventTime, AnalyticsListener.EVENT_DRM_SESSION_RELEASED, listener -> listener.onDrmSessionReleased(eventTime));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onLoadCanceled.
@Override
public final void onLoadCanceled(int windowIndex, @Nullable MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
EventTime eventTime = generateMediaPeriodEventTime(windowIndex, mediaPeriodId);
sendEvent(eventTime, AnalyticsListener.EVENT_LOAD_CANCELED, listener -> listener.onLoadCanceled(eventTime, loadEventInfo, mediaLoadData));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onPlaybackSuppressionReasonChanged.
@Override
public final void onPlaybackSuppressionReasonChanged(@PlaybackSuppressionReason int playbackSuppressionReason) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED, listener -> listener.onPlaybackSuppressionReasonChanged(eventTime, playbackSuppressionReason));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onTimelineChanged.
// Player.Listener implementation.
// TODO: Use Player.Listener.onEvents to know when a set of simultaneous callbacks finished.
// This helps to assign exactly the same EventTime to all of them instead of having slightly
// different real times.
@Override
public final void onTimelineChanged(Timeline timeline, @Player.TimelineChangeReason int reason) {
mediaPeriodQueueTracker.onTimelineChanged(checkNotNull(player));
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_TIMELINE_CHANGED, listener -> listener.onTimelineChanged(eventTime, reason));
}
Aggregations