use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onIsPlayingChanged.
@Override
public void onIsPlayingChanged(boolean isPlaying) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_IS_PLAYING_CHANGED, listener -> listener.onIsPlayingChanged(eventTime, isPlaying));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onVideoDecoderInitialized.
@Override
// Calling deprecated listener method.
@SuppressWarnings("deprecation")
public final void onVideoDecoderInitialized(String decoderName, long initializedTimestampMs, long initializationDurationMs) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_VIDEO_DECODER_INITIALIZED, listener -> {
listener.onVideoDecoderInitialized(eventTime, decoderName, initializationDurationMs);
listener.onVideoDecoderInitialized(eventTime, decoderName, initializedTimestampMs, initializationDurationMs);
listener.onDecoderInitialized(eventTime, C.TRACK_TYPE_VIDEO, decoderName, initializationDurationMs);
});
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onSkipSilenceEnabledChanged.
@Override
public final void onSkipSilenceEnabledChanged(boolean skipSilenceEnabled) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_SKIP_SILENCE_ENABLED_CHANGED, listener -> listener.onSkipSilenceEnabledChanged(eventTime, skipSilenceEnabled));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onPlaybackStateChanged.
@Override
public final void onPlaybackStateChanged(@Player.State int playbackState) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_PLAYBACK_STATE_CHANGED, listener -> listener.onPlaybackStateChanged(eventTime, playbackState));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method notifySeekStarted.
// External events.
@Override
// Calling deprecated listener method.
@SuppressWarnings("deprecation")
public final void notifySeekStarted() {
if (!isSeeking) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
isSeeking = true;
sendEvent(eventTime, /* eventFlag= */
C.INDEX_UNSET, listener -> listener.onSeekStarted(eventTime));
}
}
Aggregations