com.google.android.exoplayer2.Player.PlaybackSuppressionReason Java Examples

The following examples show how to use com.google.android.exoplayer2.Player.PlaybackSuppressionReason. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AnalyticsCollector.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@Override
public void onPlaybackSuppressionReasonChanged(
    @PlaybackSuppressionReason int playbackSuppressionReason) {
  EventTime eventTime = generatePlayingMediaPeriodEventTime();
  for (AnalyticsListener listener : listeners) {
    listener.onPlaybackSuppressionReasonChanged(eventTime, playbackSuppressionReason);
  }
}
 
Example #2
Source File: EventLogger.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@Override
public void onPlaybackSuppressionReasonChanged(
    EventTime eventTime, @PlaybackSuppressionReason int playbackSuppressionReason) {
  logd(
      eventTime,
      "playbackSuppressionReason",
      getPlaybackSuppressionReasonString(playbackSuppressionReason));
}
 
Example #3
Source File: EventLogger.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
private static String getPlaybackSuppressionReasonString(
    @PlaybackSuppressionReason int playbackSuppressionReason) {
  switch (playbackSuppressionReason) {
    case Player.PLAYBACK_SUPPRESSION_REASON_NONE:
      return "NONE";
    case Player.PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS:
      return "TRANSIENT_AUDIO_FOCUS_LOSS";
    default:
      return "?";
  }
}
 
Example #4
Source File: AnalyticsCollector.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onPlaybackSuppressionReasonChanged(
    @PlaybackSuppressionReason int playbackSuppressionReason) {
  EventTime eventTime = generatePlayingMediaPeriodEventTime();
  for (AnalyticsListener listener : listeners) {
    listener.onPlaybackSuppressionReasonChanged(eventTime, playbackSuppressionReason);
  }
}
 
Example #5
Source File: AnalyticsCollector.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onPlaybackSuppressionReasonChanged(
    @PlaybackSuppressionReason int playbackSuppressionReason) {
  EventTime eventTime = generatePlayingMediaPeriodEventTime();
  for (AnalyticsListener listener : listeners) {
    listener.onPlaybackSuppressionReasonChanged(eventTime, playbackSuppressionReason);
  }
}
 
Example #6
Source File: AnalyticsListener.java    From MediaSDK with Apache License 2.0 2 votes vote down vote up
/**
 * Called when playback suppression reason changed.
 *
 * @param eventTime The event time.
 * @param playbackSuppressionReason The new {@link PlaybackSuppressionReason}.
 */
default void onPlaybackSuppressionReasonChanged(
        EventTime eventTime, @PlaybackSuppressionReason int playbackSuppressionReason) {}
 
Example #7
Source File: AnalyticsListener.java    From Telegram-FOSS with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Called when playback suppression reason changed.
 *
 * @param eventTime The event time.
 * @param playbackSuppressionReason The new {@link PlaybackSuppressionReason}.
 */
default void onPlaybackSuppressionReasonChanged(
    EventTime eventTime, @PlaybackSuppressionReason int playbackSuppressionReason) {}
 
Example #8
Source File: AnalyticsListener.java    From Telegram with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Called when playback suppression reason changed.
 *
 * @param eventTime The event time.
 * @param playbackSuppressionReason The new {@link PlaybackSuppressionReason}.
 */
default void onPlaybackSuppressionReasonChanged(
    EventTime eventTime, @PlaybackSuppressionReason int playbackSuppressionReason) {}