MetricsConstants

class MetricsConstants
kotlin.Any
   ↳ androidx.media2.MediaPlayer2.MetricsConstants

Definitions for the metrics that are reported via the getMetrics call.

Summary

Constants
static String

Key to extract the MIME type of the video track from the MediaPlayer2#getMetrics return value.

static String

Key to extract the codec being used to decode the video track from the MediaPlayer2#getMetrics return value.

static String

Key to extract the width (in pixels) of the video track from the MediaPlayer2#getMetrics return value.

static String

Key to extract the height (in pixels) of the video track from the MediaPlayer2#getMetrics return value.

static String

Key to extract the count of video frames played from the MediaPlayer2#getMetrics return value.

static String

Key to extract the count of video frames dropped from the MediaPlayer2#getMetrics return value.

static String

Key to extract the MIME type of the audio track from the MediaPlayer2#getMetrics return value.

static String

Key to extract the codec being used to decode the audio track from the MediaPlayer2#getMetrics return value.

static String

Key to extract the duration (in milliseconds) of the media being played from the MediaPlayer2#getMetrics return value.

static String

Key to extract the playing time (in milliseconds) of the media being played from the MediaPlayer2#getMetrics return value.

static String

Key to extract the count of errors encountered while playing the media from the MediaPlayer2#getMetrics return value.

static String

Key to extract an (optional) error code detected while playing the media from the MediaPlayer2#getMetrics return value.

Constants

MIME_TYPE_VIDEO

static val MIME_TYPE_VIDEO: String

Key to extract the MIME type of the video track from the MediaPlayer2#getMetrics return value. The value is a String.

Value: "android.media.mediaplayer.video.mime"

CODEC_VIDEO

static val CODEC_VIDEO: String

Key to extract the codec being used to decode the video track from the MediaPlayer2#getMetrics return value. The value is a String.

Value: "android.media.mediaplayer.video.codec"

WIDTH

static val WIDTH: String

Key to extract the width (in pixels) of the video track from the MediaPlayer2#getMetrics return value. The value is an integer.

Value: "android.media.mediaplayer.width"

HEIGHT

static val HEIGHT: String

Key to extract the height (in pixels) of the video track from the MediaPlayer2#getMetrics return value. The value is an integer.

Value: "android.media.mediaplayer.height"

FRAMES

static val FRAMES: String

Key to extract the count of video frames played from the MediaPlayer2#getMetrics return value. The value is an integer.

Value: "android.media.mediaplayer.frames"

FRAMES_DROPPED

static val FRAMES_DROPPED: String

Key to extract the count of video frames dropped from the MediaPlayer2#getMetrics return value. The value is an integer.

Value: "android.media.mediaplayer.dropped"

MIME_TYPE_AUDIO

static val MIME_TYPE_AUDIO: String

Key to extract the MIME type of the audio track from the MediaPlayer2#getMetrics return value. The value is a String.

Value: "android.media.mediaplayer.audio.mime"

CODEC_AUDIO

static val CODEC_AUDIO: String

Key to extract the codec being used to decode the audio track from the MediaPlayer2#getMetrics return value. The value is a String.

Value: "android.media.mediaplayer.audio.codec"

DURATION

static val DURATION: String

Key to extract the duration (in milliseconds) of the media being played from the MediaPlayer2#getMetrics return value. The value is a long.

Value: "android.media.mediaplayer.durationMs"

PLAYING

static val PLAYING: String

Key to extract the playing time (in milliseconds) of the media being played from the MediaPlayer2#getMetrics return value. The value is a long.

Value: "android.media.mediaplayer.playingMs"

ERRORS

static val ERRORS: String

Key to extract the count of errors encountered while playing the media from the MediaPlayer2#getMetrics return value. The value is an integer.

Value: "android.media.mediaplayer.err"

ERROR_CODE

static val ERROR_CODE: String

Key to extract an (optional) error code detected while playing the media from the MediaPlayer2#getMetrics return value. The value is an integer.

Value: "android.media.mediaplayer.errcode"