use of androidx.media3.exoplayer.analytics.AnalyticsListener.EventTime in project media by androidx.
the class DefaultAnalyticsCollector method onPlayerError.
@Override
public final void onPlayerError(PlaybackException error) {
EventTime eventTime = getEventTimeForErrorEvent(error);
sendEvent(eventTime, AnalyticsListener.EVENT_PLAYER_ERROR, listener -> listener.onPlayerError(eventTime, error));
}
use of androidx.media3.exoplayer.analytics.AnalyticsListener.EventTime in project media by androidx.
the class DefaultAnalyticsCollector method onSurfaceSizeChanged.
@Override
public final void onSurfaceSizeChanged(int width, int height) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_SURFACE_SIZE_CHANGED, listener -> listener.onSurfaceSizeChanged(eventTime, width, height));
}
use of androidx.media3.exoplayer.analytics.AnalyticsListener.EventTime in project media by androidx.
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 androidx.media3.exoplayer.analytics.AnalyticsListener.EventTime in project media by androidx.
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 androidx.media3.exoplayer.analytics.AnalyticsListener.EventTime in project media by androidx.
the class DefaultAnalyticsCollector method onVideoSizeChanged.
// Calling deprecated listener method.
@SuppressWarnings("deprecation")
@Override
public final void onVideoSizeChanged(VideoSize videoSize) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_VIDEO_SIZE_CHANGED, listener -> {
listener.onVideoSizeChanged(eventTime, videoSize);
listener.onVideoSizeChanged(eventTime, videoSize.width, videoSize.height, videoSize.unappliedRotationDegrees, videoSize.pixelWidthHeightRatio);
});
}
Aggregations