use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onVideoEnabled.
// Video events.
@Override
// Calling deprecated listener method.
@SuppressWarnings("deprecation")
public final void onVideoEnabled(DecoderCounters counters) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_VIDEO_ENABLED, listener -> {
listener.onVideoEnabled(eventTime, counters);
listener.onDecoderEnabled(eventTime, C.TRACK_TYPE_VIDEO, counters);
});
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onUpstreamDiscarded.
@Override
public final void onUpstreamDiscarded(int windowIndex, @Nullable MediaPeriodId mediaPeriodId, MediaLoadData mediaLoadData) {
EventTime eventTime = generateMediaPeriodEventTime(windowIndex, mediaPeriodId);
sendEvent(eventTime, AnalyticsListener.EVENT_UPSTREAM_DISCARDED, listener -> listener.onUpstreamDiscarded(eventTime, mediaLoadData));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onDeviceInfoChanged.
@Override
public void onDeviceInfoChanged(DeviceInfo deviceInfo) {
EventTime eventTime = generateCurrentPlayerMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_DEVICE_INFO_CHANGED, listener -> listener.onDeviceInfoChanged(eventTime, deviceInfo));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onAudioDecoderReleased.
@Override
public final void onAudioDecoderReleased(String decoderName) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_AUDIO_DECODER_RELEASED, listener -> listener.onAudioDecoderReleased(eventTime, decoderName));
}
use of com.google.android.exoplayer2.Player.Listener in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onVolumeChanged.
@Override
public final void onVolumeChanged(float volume) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_VOLUME_CHANGED, listener -> listener.onVolumeChanged(eventTime, volume));
}
Aggregations