Class PlaybackStats
- java.lang.Object
-
- com.google.android.exoplayer2.analytics.PlaybackStats
-
@Deprecated public final class PlaybackStats extends Object
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Statistics about playbacks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPlaybackStats.EventTimeAndExceptionDeprecated.Stores an exception with the event time at which it occurred.static classPlaybackStats.EventTimeAndFormatDeprecated.Stores a format with the event time at which it started being used, ornullto indicate that no format was used.static classPlaybackStats.EventTimeAndPlaybackStateDeprecated.Stores a playback state with the event time at which it became active.
-
Field Summary
Fields Modifier and Type Field Description intabandonedBeforeReadyCountDeprecated.The number of playbacks which were abandoned before they were ready to play.intadPlaybackCountDeprecated.The number of ad playbacks.List<PlaybackStats.EventTimeAndFormat>audioFormatHistoryDeprecated.The audio format history asEventTimeAndFormatsordered byEventTime.realTimeMs.intbackgroundJoiningCountDeprecated.The number of playbacks which were pre-buffered in the background.static PlaybackStatsEMPTYDeprecated.Empty playback stats.intendedCountDeprecated.The number of playbacks which reached the ended state at least once.intfatalErrorCountDeprecated.The total number of fatal errors.List<PlaybackStats.EventTimeAndException>fatalErrorHistoryDeprecated.The history of fatal errors asEventTimeAndExceptionsordered byEventTime.realTimeMs.intfatalErrorPlaybackCountDeprecated.The total number of playback with at least one fatal error.longfirstReportedTimeMsDeprecated.The elapsed real-time as returned bySystemClock.elapsedRealtime()of the first reported playback event, orC.TIME_UNSETif no event has been reported.intforegroundPlaybackCountDeprecated.The number of playbacks which were the active foreground playback at some point.intinitialAudioFormatBitrateCountDeprecated.The number of playbacks with initial audio format bitrate data.intinitialVideoFormatBitrateCountDeprecated.The number of playbacks with initial video format bitrate data.intinitialVideoFormatHeightCountDeprecated.The number of playbacks with initial video format height data.longmaxRebufferTimeMsDeprecated.The maximum time spent during a single rebuffer, in milliseconds, orC.TIME_UNSETif no rebuffer occurred.List<long[]>mediaTimeHistoryDeprecated.The media time history as an ordered list of long[2] arrays with [0] being the realtime as returned bySystemClock.elapsedRealtime()and [1] being the media time at this realtime, in milliseconds.intnonFatalErrorCountDeprecated.The total number of non-fatal errors.List<PlaybackStats.EventTimeAndException>nonFatalErrorHistoryDeprecated.The history of non-fatal errors asEventTimeAndExceptionsordered byEventTime.realTimeMs.static intPLAYBACK_STATE_ABANDONEDDeprecated.Playback is abandoned before reaching the end of the media.static intPLAYBACK_STATE_BUFFERINGDeprecated.Playback is buffering to resume active playback.static intPLAYBACK_STATE_ENDEDDeprecated.Playback has reached the end of the media.static intPLAYBACK_STATE_FAILEDDeprecated.Playback is stopped due a fatal error and can be retried.static intPLAYBACK_STATE_INTERRUPTED_BY_ADDeprecated.Playback is interrupted by an ad.static intPLAYBACK_STATE_JOINING_BACKGROUNDDeprecated.Playback is buffering in the background for initial playback start.static intPLAYBACK_STATE_JOINING_FOREGROUNDDeprecated.Playback is buffering in the foreground for initial playback start.static intPLAYBACK_STATE_NOT_STARTEDDeprecated.Playback has not started (initial state).static intPLAYBACK_STATE_PAUSEDDeprecated.Playback is paused but ready to play.static intPLAYBACK_STATE_PAUSED_BUFFERINGDeprecated.Playback is buffering while paused.static intPLAYBACK_STATE_PLAYINGDeprecated.Playback is actively playing.static intPLAYBACK_STATE_SEEKINGDeprecated.Playback is handling a seek.static intPLAYBACK_STATE_STOPPEDDeprecated.Playback is stopped and can be restarted.static intPLAYBACK_STATE_SUPPRESSEDDeprecated.Playback is suppressed (e.g.static intPLAYBACK_STATE_SUPPRESSED_BUFFERINGDeprecated.Playback is suppressed (e.g.intplaybackCountDeprecated.The number of individual playbacks for which these stats were collected.List<PlaybackStats.EventTimeAndPlaybackState>playbackStateHistoryDeprecated.The playback state history asEventTimeAndPlaybackStatesordered byEventTime.realTimeMs.longtotalAudioFormatBitrateTimeProductDeprecated.The accumulated sum of all audio format bitrates, in bits per second, times the time the format was used for playback, in milliseconds.longtotalAudioFormatTimeMsDeprecated.The total media time for which audio format data is available, in milliseconds.longtotalAudioUnderrunsDeprecated.The total number of audio underruns.longtotalBandwidthBytesDeprecated.The total bytes transferred duringtotalBandwidthTimeMs.longtotalBandwidthTimeMsDeprecated.The total time for which bandwidth measurement data is available, in milliseconds.longtotalDroppedFramesDeprecated.The total number of dropped video frames.longtotalInitialAudioFormatBitrateDeprecated.The total initial audio format bitrate for all playbacks, in bits per second, orC.LENGTH_UNSETif no initial audio format data is available.longtotalInitialVideoFormatBitrateDeprecated.The total initial video format bitrate for all playbacks, in bits per second, orC.LENGTH_UNSETif no initial video format data is available.inttotalInitialVideoFormatHeightDeprecated.The total initial video format height for all playbacks, in pixels, orC.LENGTH_UNSETif no initial video format data is available.inttotalPauseBufferCountDeprecated.The total number of times a playback has been paused while rebuffering.inttotalPauseCountDeprecated.The total number of times a playback has been paused.inttotalRebufferCountDeprecated.The total number of times a rebuffer occurred.inttotalSeekCountDeprecated.The total number of times a seek occurred.longtotalValidJoinTimeMsDeprecated.The total time spent joining the playback, in milliseconds, orC.TIME_UNSETif no valid join time could be determined.longtotalVideoFormatBitrateTimeMsDeprecated.The total media time for which video format bitrate data is available, in milliseconds.longtotalVideoFormatBitrateTimeProductDeprecated.The accumulated sum of all video format bitrates, in bits per second, times the time the format was used for playback, in milliseconds.longtotalVideoFormatHeightTimeMsDeprecated.The total media time for which video format height data is available, in milliseconds.longtotalVideoFormatHeightTimeProductDeprecated.The accumulated sum of all video format heights, in pixels, times the time the format was used for playback, in milliseconds.intvalidJoinTimeCountDeprecated.The number of playbacks with a valid join time as documented intotalValidJoinTimeMs.List<PlaybackStats.EventTimeAndFormat>videoFormatHistoryDeprecated.The video format history asEventTimeAndFormatsordered byEventTime.realTimeMs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description floatgetAbandonedBeforeReadyRatio()Deprecated.Returns the ratio of foreground playbacks which were abandoned before they were ready to play, or0.0if no playback has been in foreground.floatgetAudioUnderrunRate()Deprecated.Returns the mean rate at which audio underruns occurred, in underruns per play time second, or0.0if no time was spent playing.floatgetDroppedFramesRate()Deprecated.Returns the mean rate at which video frames are dropped, in dropped frames per play time second, or0.0if no time was spent playing.floatgetEndedRatio()Deprecated.Returns the ratio of foreground playbacks which reached the ended state at least once, or0.0if no playback has been in foreground.floatgetFatalErrorRate()Deprecated.Returns the rate of fatal errors, in errors per play time second, or0.0if no time was spend playing.floatgetFatalErrorRatio()Deprecated.Returns the ratio of foreground playbacks which experienced fatal errors, or0.0if no playback has been in foreground.floatgetJoinTimeRatio()Deprecated.Returns the ratio of foreground join time to the total time spent playing and waiting, or0.0if no time was spend playing or waiting.intgetMeanAudioFormatBitrate()Deprecated.Returns the mean audio format bitrate, in bits per second, orC.LENGTH_UNSETif no audio format data is available.intgetMeanBandwidth()Deprecated.Returns the mean network bandwidth based on transfer measurements, in bits per second, orC.LENGTH_UNSETif no transfer data is available.longgetMeanElapsedTimeMs()Deprecated.Returns the mean time covered by any playback state per playback, in milliseconds, orC.TIME_UNSETif no playback was recorded.intgetMeanInitialAudioFormatBitrate()Deprecated.Returns the mean initial audio format bitrate, in bits per second, orC.LENGTH_UNSETif no audio format data is available.intgetMeanInitialVideoFormatBitrate()Deprecated.Returns the mean initial video format bitrate, in bits per second, orC.LENGTH_UNSETif no video format data is available.intgetMeanInitialVideoFormatHeight()Deprecated.Returns the mean initial video format height, in pixels, orC.LENGTH_UNSETif no video format data is available.longgetMeanJoinTimeMs()Deprecated.Returns the mean time spent joining the playback, in milliseconds, orC.TIME_UNSETif no valid join time is available.floatgetMeanNonFatalErrorCount()Deprecated.Returns the mean number of non-fatal errors per foreground playback, or0.0if no playback has been in foreground.floatgetMeanPauseBufferCount()Deprecated.Returns the mean number of times a playback has been paused while rebuffering per foreground playback, or0.0if no playback has been in foreground.floatgetMeanPauseCount()Deprecated.Returns the mean number of times a playback has been paused per foreground playback, or0.0if no playback has been in foreground.longgetMeanPausedTimeMs()Deprecated.Returns the mean time spent in a paused state per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.longgetMeanPlayAndWaitTimeMs()Deprecated.Returns the mean time spent playing or actively waiting for playback per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.longgetMeanPlayTimeMs()Deprecated.Returns the mean time spent actively playing per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.floatgetMeanRebufferCount()Deprecated.Returns the mean number of times a rebuffer occurred per foreground playback, or0.0if no playback has been in foreground.longgetMeanRebufferTimeMs()Deprecated.Returns the mean time spent rebuffering per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.floatgetMeanSeekCount()Deprecated.Returns the mean number of times a seek occurred per foreground playback, or0.0if no playback has been in foreground.longgetMeanSeekTimeMs()Deprecated.Returns the mean time spent per foreground playback from the start of a seek until playback is ready again, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.longgetMeanSingleRebufferTimeMs()Deprecated.Returns the mean time spent during a single rebuffer, in milliseconds, orC.TIME_UNSETif no rebuffer was recorded.longgetMeanSingleSeekTimeMs()Deprecated.Returns the mean time spent from the start of a single seek until playback is ready again, in milliseconds, orC.TIME_UNSETif no seek occurred.floatgetMeanTimeBetweenFatalErrors()Deprecated.Returns the mean play time between fatal errors, in seconds.floatgetMeanTimeBetweenNonFatalErrors()Deprecated.Returns the mean play time between non-fatal errors, in seconds.floatgetMeanTimeBetweenRebuffers()Deprecated.Returns the mean play time between rebuffer events, in seconds.intgetMeanVideoFormatBitrate()Deprecated.Returns the mean video format bitrate, in bits per second, orC.LENGTH_UNSETif no video format data is available.intgetMeanVideoFormatHeight()Deprecated.Returns the mean video format height, in pixels, orC.LENGTH_UNSETif no video format data is available.longgetMeanWaitTimeMs()Deprecated.Returns the mean time spent actively waiting for playback per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.longgetMediaTimeMsAtRealtimeMs(long realtimeMs)Deprecated.Returns the estimated media time at the given realtime, in milliseconds, orC.TIME_UNSETif the media time history is unknown.floatgetNonFatalErrorRate()Deprecated.Returns the rate of non-fatal errors, in errors per play time second, or0.0if no time was spend playing.@com.google.android.exoplayer2.analytics.PlaybackStats.PlaybackState intgetPlaybackStateAtTime(long realtimeMs)Deprecated.Returns thePlaybackStats.PlaybackStateat the given time.longgetPlaybackStateDurationMs(@com.google.android.exoplayer2.analytics.PlaybackStats.PlaybackState int playbackState)Deprecated.Returns the total time spent in a givenPlaybackStats.PlaybackState, in milliseconds.floatgetRebufferRate()Deprecated.Returns the rate of rebuffer events, in rebuffers per play time second, or0.0if no time was spend playing.floatgetRebufferTimeRatio()Deprecated.Returns the ratio of rebuffer time to the total time spent playing and waiting, or0.0if no time was spend playing or waiting.floatgetSeekTimeRatio()Deprecated.Returns the ratio of seek time to the total time spent playing and waiting, or0.0if no time was spend playing or waiting.longgetTotalElapsedTimeMs()Deprecated.Returns the total time covered by any playback state, in milliseconds.longgetTotalJoinTimeMs()Deprecated.Returns the total time spent joining the playback in foreground, in milliseconds.longgetTotalPausedTimeMs()Deprecated.Returns the total time spent in a paused state, in milliseconds.longgetTotalPlayAndWaitTimeMs()Deprecated.Returns the total time spent playing or actively waiting for playback, in milliseconds.longgetTotalPlayTimeMs()Deprecated.Returns the total time spent actively playing, in milliseconds.longgetTotalRebufferTimeMs()Deprecated.Returns the total time spent rebuffering, in milliseconds.longgetTotalSeekTimeMs()Deprecated.Returns the total time spent from the start of a seek until playback is ready again, in milliseconds.longgetTotalWaitTimeMs()Deprecated.Returns the total time spent actively waiting for playback, in milliseconds.floatgetWaitTimeRatio()Deprecated.Returns the ratio of wait times to the total time spent playing and waiting, or0.0if no time was spend playing or waiting.static PlaybackStatsmerge(PlaybackStats... playbackStats)Deprecated.Returns the combinedPlaybackStatsfor all inputPlaybackStats.
-
-
-
Field Detail
-
PLAYBACK_STATE_NOT_STARTED
public static final int PLAYBACK_STATE_NOT_STARTED
Deprecated.Playback has not started (initial state).- See Also:
- Constant Field Values
-
PLAYBACK_STATE_JOINING_BACKGROUND
public static final int PLAYBACK_STATE_JOINING_BACKGROUND
Deprecated.Playback is buffering in the background for initial playback start.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_JOINING_FOREGROUND
public static final int PLAYBACK_STATE_JOINING_FOREGROUND
Deprecated.Playback is buffering in the foreground for initial playback start.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_PLAYING
public static final int PLAYBACK_STATE_PLAYING
Deprecated.Playback is actively playing.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_PAUSED
public static final int PLAYBACK_STATE_PAUSED
Deprecated.Playback is paused but ready to play.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_SEEKING
public static final int PLAYBACK_STATE_SEEKING
Deprecated.Playback is handling a seek.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_BUFFERING
public static final int PLAYBACK_STATE_BUFFERING
Deprecated.Playback is buffering to resume active playback.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_PAUSED_BUFFERING
public static final int PLAYBACK_STATE_PAUSED_BUFFERING
Deprecated.Playback is buffering while paused.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_SUPPRESSED
public static final int PLAYBACK_STATE_SUPPRESSED
Deprecated.Playback is suppressed (e.g. due to audio focus loss).- See Also:
- Constant Field Values
-
PLAYBACK_STATE_SUPPRESSED_BUFFERING
public static final int PLAYBACK_STATE_SUPPRESSED_BUFFERING
Deprecated.Playback is suppressed (e.g. due to audio focus loss) while buffering to resume a playback.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_ENDED
public static final int PLAYBACK_STATE_ENDED
Deprecated.Playback has reached the end of the media.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_STOPPED
public static final int PLAYBACK_STATE_STOPPED
Deprecated.Playback is stopped and can be restarted.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_FAILED
public static final int PLAYBACK_STATE_FAILED
Deprecated.Playback is stopped due a fatal error and can be retried.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_INTERRUPTED_BY_AD
public static final int PLAYBACK_STATE_INTERRUPTED_BY_AD
Deprecated.Playback is interrupted by an ad.- See Also:
- Constant Field Values
-
PLAYBACK_STATE_ABANDONED
public static final int PLAYBACK_STATE_ABANDONED
Deprecated.Playback is abandoned before reaching the end of the media.- See Also:
- Constant Field Values
-
EMPTY
public static final PlaybackStats EMPTY
Deprecated.Empty playback stats.
-
playbackCount
public final int playbackCount
Deprecated.The number of individual playbacks for which these stats were collected.
-
playbackStateHistory
public final List<PlaybackStats.EventTimeAndPlaybackState> playbackStateHistory
Deprecated.The playback state history asEventTimeAndPlaybackStatesordered byEventTime.realTimeMs.
-
mediaTimeHistory
public final List<long[]> mediaTimeHistory
Deprecated.The media time history as an ordered list of long[2] arrays with [0] being the realtime as returned bySystemClock.elapsedRealtime()and [1] being the media time at this realtime, in milliseconds.
-
firstReportedTimeMs
public final long firstReportedTimeMs
Deprecated.The elapsed real-time as returned bySystemClock.elapsedRealtime()of the first reported playback event, orC.TIME_UNSETif no event has been reported.
-
foregroundPlaybackCount
public final int foregroundPlaybackCount
Deprecated.The number of playbacks which were the active foreground playback at some point.
-
abandonedBeforeReadyCount
public final int abandonedBeforeReadyCount
Deprecated.The number of playbacks which were abandoned before they were ready to play.
-
endedCount
public final int endedCount
Deprecated.The number of playbacks which reached the ended state at least once.
-
backgroundJoiningCount
public final int backgroundJoiningCount
Deprecated.The number of playbacks which were pre-buffered in the background.
-
totalValidJoinTimeMs
public final long totalValidJoinTimeMs
Deprecated.The total time spent joining the playback, in milliseconds, orC.TIME_UNSETif no valid join time could be determined.Note that this does not include background joining time. A join time may be invalid if the playback never reached
PLAYBACK_STATE_PLAYINGorPLAYBACK_STATE_PAUSED, or joining was interrupted by a seek, stop, or error state.
-
validJoinTimeCount
public final int validJoinTimeCount
Deprecated.The number of playbacks with a valid join time as documented intotalValidJoinTimeMs.
-
totalPauseCount
public final int totalPauseCount
Deprecated.The total number of times a playback has been paused.
-
totalPauseBufferCount
public final int totalPauseBufferCount
Deprecated.The total number of times a playback has been paused while rebuffering.
-
totalSeekCount
public final int totalSeekCount
Deprecated.The total number of times a seek occurred. This includes seeks happening before playback resumed after another seek.
-
totalRebufferCount
public final int totalRebufferCount
Deprecated.The total number of times a rebuffer occurred. This excludes initial joining and buffering after seek.
-
maxRebufferTimeMs
public final long maxRebufferTimeMs
Deprecated.The maximum time spent during a single rebuffer, in milliseconds, orC.TIME_UNSETif no rebuffer occurred.
-
adPlaybackCount
public final int adPlaybackCount
Deprecated.The number of ad playbacks.
-
videoFormatHistory
public final List<PlaybackStats.EventTimeAndFormat> videoFormatHistory
Deprecated.The video format history asEventTimeAndFormatsordered byEventTime.realTimeMs. TheFormatmay be null if no video format was used.
-
audioFormatHistory
public final List<PlaybackStats.EventTimeAndFormat> audioFormatHistory
Deprecated.The audio format history asEventTimeAndFormatsordered byEventTime.realTimeMs. TheFormatmay be null if no audio format was used.
-
totalVideoFormatHeightTimeMs
public final long totalVideoFormatHeightTimeMs
Deprecated.The total media time for which video format height data is available, in milliseconds.
-
totalVideoFormatHeightTimeProduct
public final long totalVideoFormatHeightTimeProduct
Deprecated.The accumulated sum of all video format heights, in pixels, times the time the format was used for playback, in milliseconds.
-
totalVideoFormatBitrateTimeMs
public final long totalVideoFormatBitrateTimeMs
Deprecated.The total media time for which video format bitrate data is available, in milliseconds.
-
totalVideoFormatBitrateTimeProduct
public final long totalVideoFormatBitrateTimeProduct
Deprecated.The accumulated sum of all video format bitrates, in bits per second, times the time the format was used for playback, in milliseconds.
-
totalAudioFormatTimeMs
public final long totalAudioFormatTimeMs
Deprecated.The total media time for which audio format data is available, in milliseconds.
-
totalAudioFormatBitrateTimeProduct
public final long totalAudioFormatBitrateTimeProduct
Deprecated.The accumulated sum of all audio format bitrates, in bits per second, times the time the format was used for playback, in milliseconds.
-
initialVideoFormatHeightCount
public final int initialVideoFormatHeightCount
Deprecated.The number of playbacks with initial video format height data.
-
initialVideoFormatBitrateCount
public final int initialVideoFormatBitrateCount
Deprecated.The number of playbacks with initial video format bitrate data.
-
totalInitialVideoFormatHeight
public final int totalInitialVideoFormatHeight
Deprecated.The total initial video format height for all playbacks, in pixels, orC.LENGTH_UNSETif no initial video format data is available.
-
totalInitialVideoFormatBitrate
public final long totalInitialVideoFormatBitrate
Deprecated.The total initial video format bitrate for all playbacks, in bits per second, orC.LENGTH_UNSETif no initial video format data is available.
-
initialAudioFormatBitrateCount
public final int initialAudioFormatBitrateCount
Deprecated.The number of playbacks with initial audio format bitrate data.
-
totalInitialAudioFormatBitrate
public final long totalInitialAudioFormatBitrate
Deprecated.The total initial audio format bitrate for all playbacks, in bits per second, orC.LENGTH_UNSETif no initial audio format data is available.
-
totalBandwidthTimeMs
public final long totalBandwidthTimeMs
Deprecated.The total time for which bandwidth measurement data is available, in milliseconds.
-
totalBandwidthBytes
public final long totalBandwidthBytes
Deprecated.The total bytes transferred duringtotalBandwidthTimeMs.
-
totalDroppedFrames
public final long totalDroppedFrames
Deprecated.The total number of dropped video frames.
-
totalAudioUnderruns
public final long totalAudioUnderruns
Deprecated.The total number of audio underruns.
-
fatalErrorPlaybackCount
public final int fatalErrorPlaybackCount
Deprecated.The total number of playback with at least one fatal error. Errors are fatal if playback stopped due to this error.
-
fatalErrorCount
public final int fatalErrorCount
Deprecated.The total number of fatal errors. Errors are fatal if playback stopped due to this error.
-
nonFatalErrorCount
public final int nonFatalErrorCount
Deprecated.The total number of non-fatal errors. Error are non-fatal if playback can recover from the error without stopping.
-
fatalErrorHistory
public final List<PlaybackStats.EventTimeAndException> fatalErrorHistory
Deprecated.The history of fatal errors asEventTimeAndExceptionsordered byEventTime.realTimeMs. Errors are fatal if playback stopped due to this error.
-
nonFatalErrorHistory
public final List<PlaybackStats.EventTimeAndException> nonFatalErrorHistory
Deprecated.The history of non-fatal errors asEventTimeAndExceptionsordered byEventTime.realTimeMs. Errors are non-fatal if playback can recover from the error without stopping.
-
-
Method Detail
-
merge
public static PlaybackStats merge(PlaybackStats... playbackStats)
Deprecated.Returns the combinedPlaybackStatsfor all inputPlaybackStats.Note that the full history of events is not kept as the history only makes sense in the context of a single playback.
- Parameters:
playbackStats- Array ofPlaybackStatsto combine.- Returns:
- The combined
PlaybackStats.
-
getPlaybackStateDurationMs
public long getPlaybackStateDurationMs(@com.google.android.exoplayer2.analytics.PlaybackStats.PlaybackState int playbackState)
Deprecated.Returns the total time spent in a givenPlaybackStats.PlaybackState, in milliseconds.- Parameters:
playbackState- APlaybackStats.PlaybackState.- Returns:
- Total spent in the given playback state, in milliseconds
-
getPlaybackStateAtTime
public @com.google.android.exoplayer2.analytics.PlaybackStats.PlaybackState int getPlaybackStateAtTime(long realtimeMs)
Deprecated.Returns thePlaybackStats.PlaybackStateat the given time.- Parameters:
realtimeMs- The time as returned bySystemClock.elapsedRealtime().- Returns:
- The
PlaybackStats.PlaybackStateat that time, orPLAYBACK_STATE_NOT_STARTEDif the given time is before the first known playback state in the history.
-
getMediaTimeMsAtRealtimeMs
public long getMediaTimeMsAtRealtimeMs(long realtimeMs)
Deprecated.Returns the estimated media time at the given realtime, in milliseconds, orC.TIME_UNSETif the media time history is unknown.- Parameters:
realtimeMs- The realtime as returned bySystemClock.elapsedRealtime().- Returns:
- The estimated media time in milliseconds at this realtime,
C.TIME_UNSETif no estimate can be given.
-
getMeanJoinTimeMs
public long getMeanJoinTimeMs()
Deprecated.Returns the mean time spent joining the playback, in milliseconds, orC.TIME_UNSETif no valid join time is available. Only includes playbacks with valid join times as documented intotalValidJoinTimeMs.
-
getTotalJoinTimeMs
public long getTotalJoinTimeMs()
Deprecated.Returns the total time spent joining the playback in foreground, in milliseconds. This does include invalid join times where the playback never reachedPLAYBACK_STATE_PLAYINGorPLAYBACK_STATE_PAUSED, or joining was interrupted by a seek, stop, or error state.
-
getTotalPlayTimeMs
public long getTotalPlayTimeMs()
Deprecated.Returns the total time spent actively playing, in milliseconds.
-
getMeanPlayTimeMs
public long getMeanPlayTimeMs()
Deprecated.Returns the mean time spent actively playing per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.
-
getTotalPausedTimeMs
public long getTotalPausedTimeMs()
Deprecated.Returns the total time spent in a paused state, in milliseconds.
-
getMeanPausedTimeMs
public long getMeanPausedTimeMs()
Deprecated.Returns the mean time spent in a paused state per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.
-
getTotalRebufferTimeMs
public long getTotalRebufferTimeMs()
Deprecated.Returns the total time spent rebuffering, in milliseconds. This excludes initial join times, buffer times after a seek and buffering while paused.
-
getMeanRebufferTimeMs
public long getMeanRebufferTimeMs()
Deprecated.Returns the mean time spent rebuffering per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground. This excludes initial join times, buffer times after a seek and buffering while paused.
-
getMeanSingleRebufferTimeMs
public long getMeanSingleRebufferTimeMs()
Deprecated.Returns the mean time spent during a single rebuffer, in milliseconds, orC.TIME_UNSETif no rebuffer was recorded. This excludes initial join times and buffer times after a seek.
-
getTotalSeekTimeMs
public long getTotalSeekTimeMs()
Deprecated.Returns the total time spent from the start of a seek until playback is ready again, in milliseconds.
-
getMeanSeekTimeMs
public long getMeanSeekTimeMs()
Deprecated.Returns the mean time spent per foreground playback from the start of a seek until playback is ready again, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.
-
getMeanSingleSeekTimeMs
public long getMeanSingleSeekTimeMs()
Deprecated.Returns the mean time spent from the start of a single seek until playback is ready again, in milliseconds, orC.TIME_UNSETif no seek occurred.
-
getTotalWaitTimeMs
public long getTotalWaitTimeMs()
Deprecated.Returns the total time spent actively waiting for playback, in milliseconds. This includes all join times, rebuffer times and seek times, but excludes times without user intention to play, e.g. all paused states.
-
getMeanWaitTimeMs
public long getMeanWaitTimeMs()
Deprecated.Returns the mean time spent actively waiting for playback per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground. This includes all join times, rebuffer times and seek times, but excludes times without user intention to play, e.g. all paused states.
-
getTotalPlayAndWaitTimeMs
public long getTotalPlayAndWaitTimeMs()
Deprecated.Returns the total time spent playing or actively waiting for playback, in milliseconds.
-
getMeanPlayAndWaitTimeMs
public long getMeanPlayAndWaitTimeMs()
Deprecated.Returns the mean time spent playing or actively waiting for playback per foreground playback, in milliseconds, orC.TIME_UNSETif no playback has been in foreground.
-
getTotalElapsedTimeMs
public long getTotalElapsedTimeMs()
Deprecated.Returns the total time covered by any playback state, in milliseconds.
-
getMeanElapsedTimeMs
public long getMeanElapsedTimeMs()
Deprecated.Returns the mean time covered by any playback state per playback, in milliseconds, orC.TIME_UNSETif no playback was recorded.
-
getAbandonedBeforeReadyRatio
public float getAbandonedBeforeReadyRatio()
Deprecated.Returns the ratio of foreground playbacks which were abandoned before they were ready to play, or0.0if no playback has been in foreground.
-
getEndedRatio
public float getEndedRatio()
Deprecated.Returns the ratio of foreground playbacks which reached the ended state at least once, or0.0if no playback has been in foreground.
-
getMeanPauseCount
public float getMeanPauseCount()
Deprecated.Returns the mean number of times a playback has been paused per foreground playback, or0.0if no playback has been in foreground.
-
getMeanPauseBufferCount
public float getMeanPauseBufferCount()
Deprecated.Returns the mean number of times a playback has been paused while rebuffering per foreground playback, or0.0if no playback has been in foreground.
-
getMeanSeekCount
public float getMeanSeekCount()
Deprecated.Returns the mean number of times a seek occurred per foreground playback, or0.0if no playback has been in foreground. This includes seeks happening before playback resumed after another seek.
-
getMeanRebufferCount
public float getMeanRebufferCount()
Deprecated.Returns the mean number of times a rebuffer occurred per foreground playback, or0.0if no playback has been in foreground. This excludes initial joining and buffering after seek.
-
getWaitTimeRatio
public float getWaitTimeRatio()
Deprecated.Returns the ratio of wait times to the total time spent playing and waiting, or0.0if no time was spend playing or waiting. This is equivalent togetTotalWaitTimeMs()/getTotalPlayAndWaitTimeMs()and also togetJoinTimeRatio()+getRebufferTimeRatio()+getSeekTimeRatio().
-
getJoinTimeRatio
public float getJoinTimeRatio()
Deprecated.Returns the ratio of foreground join time to the total time spent playing and waiting, or0.0if no time was spend playing or waiting. This is equivalent togetTotalJoinTimeMs()/getTotalPlayAndWaitTimeMs().
-
getRebufferTimeRatio
public float getRebufferTimeRatio()
Deprecated.Returns the ratio of rebuffer time to the total time spent playing and waiting, or0.0if no time was spend playing or waiting. This is equivalent togetTotalRebufferTimeMs()/getTotalPlayAndWaitTimeMs().
-
getSeekTimeRatio
public float getSeekTimeRatio()
Deprecated.Returns the ratio of seek time to the total time spent playing and waiting, or0.0if no time was spend playing or waiting. This is equivalent togetTotalSeekTimeMs()/getTotalPlayAndWaitTimeMs().
-
getRebufferRate
public float getRebufferRate()
Deprecated.Returns the rate of rebuffer events, in rebuffers per play time second, or0.0if no time was spend playing. This is equivalent to 1.0 /getMeanTimeBetweenRebuffers().
-
getMeanTimeBetweenRebuffers
public float getMeanTimeBetweenRebuffers()
Deprecated.Returns the mean play time between rebuffer events, in seconds. This is equivalent to 1.0 /getRebufferRate(). Note that this may returnFloat.POSITIVE_INFINITY.
-
getMeanInitialVideoFormatHeight
public int getMeanInitialVideoFormatHeight()
Deprecated.Returns the mean initial video format height, in pixels, orC.LENGTH_UNSETif no video format data is available.
-
getMeanInitialVideoFormatBitrate
public int getMeanInitialVideoFormatBitrate()
Deprecated.Returns the mean initial video format bitrate, in bits per second, orC.LENGTH_UNSETif no video format data is available.
-
getMeanInitialAudioFormatBitrate
public int getMeanInitialAudioFormatBitrate()
Deprecated.Returns the mean initial audio format bitrate, in bits per second, orC.LENGTH_UNSETif no audio format data is available.
-
getMeanVideoFormatHeight
public int getMeanVideoFormatHeight()
Deprecated.Returns the mean video format height, in pixels, orC.LENGTH_UNSETif no video format data is available. This is a weighted average taking the time the format was used for playback into account.
-
getMeanVideoFormatBitrate
public int getMeanVideoFormatBitrate()
Deprecated.Returns the mean video format bitrate, in bits per second, orC.LENGTH_UNSETif no video format data is available. This is a weighted average taking the time the format was used for playback into account.
-
getMeanAudioFormatBitrate
public int getMeanAudioFormatBitrate()
Deprecated.Returns the mean audio format bitrate, in bits per second, orC.LENGTH_UNSETif no audio format data is available. This is a weighted average taking the time the format was used for playback into account.
-
getMeanBandwidth
public int getMeanBandwidth()
Deprecated.Returns the mean network bandwidth based on transfer measurements, in bits per second, orC.LENGTH_UNSETif no transfer data is available.
-
getDroppedFramesRate
public float getDroppedFramesRate()
Deprecated.Returns the mean rate at which video frames are dropped, in dropped frames per play time second, or0.0if no time was spent playing.
-
getAudioUnderrunRate
public float getAudioUnderrunRate()
Deprecated.Returns the mean rate at which audio underruns occurred, in underruns per play time second, or0.0if no time was spent playing.
-
getFatalErrorRatio
public float getFatalErrorRatio()
Deprecated.Returns the ratio of foreground playbacks which experienced fatal errors, or0.0if no playback has been in foreground.
-
getFatalErrorRate
public float getFatalErrorRate()
Deprecated.Returns the rate of fatal errors, in errors per play time second, or0.0if no time was spend playing. This is equivalent to 1.0 /getMeanTimeBetweenFatalErrors().
-
getMeanTimeBetweenFatalErrors
public float getMeanTimeBetweenFatalErrors()
Deprecated.Returns the mean play time between fatal errors, in seconds. This is equivalent to 1.0 /getFatalErrorRate(). Note that this may returnFloat.POSITIVE_INFINITY.
-
getMeanNonFatalErrorCount
public float getMeanNonFatalErrorCount()
Deprecated.Returns the mean number of non-fatal errors per foreground playback, or0.0if no playback has been in foreground.
-
getNonFatalErrorRate
public float getNonFatalErrorRate()
Deprecated.Returns the rate of non-fatal errors, in errors per play time second, or0.0if no time was spend playing. This is equivalent to 1.0 /getMeanTimeBetweenNonFatalErrors().
-
getMeanTimeBetweenNonFatalErrors
public float getMeanTimeBetweenNonFatalErrors()
Deprecated.Returns the mean play time between non-fatal errors, in seconds. This is equivalent to 1.0 /getNonFatalErrorRate(). Note that this may returnFloat.POSITIVE_INFINITY.
-
-