belongs to Maven artifact androidx.media:media:1.0.0-alpha1

MediaPlayer2.MetricsConstants

public static final class MediaPlayer2.MetricsConstants
extends Object

java.lang.Object
   ↳ androidx.media.MediaPlayer2.MetricsConstants


Definitions for the metrics that are reported via the MediaPlayer2.getMetrics() call.

Summary

Constants

String CODEC_AUDIO

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

String CODEC_VIDEO

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

String DURATION

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

String ERRORS

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

String ERROR_CODE

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

String FRAMES

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

String FRAMES_DROPPED

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

String HEIGHT

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

String MIME_TYPE_AUDIO

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

String MIME_TYPE_VIDEO

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

String PLAYING

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

String WIDTH

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

Inherited methods

Constants

CODEC_AUDIO

String CODEC_AUDIO

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

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

CODEC_VIDEO

String CODEC_VIDEO

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

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

DURATION

String DURATION

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

Constant Value: "android.media.mediaplayer.durationMs"

ERRORS

String ERRORS

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

Constant Value: "android.media.mediaplayer.err"

ERROR_CODE

String ERROR_CODE

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

Constant Value: "android.media.mediaplayer.errcode"

FRAMES

String FRAMES

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

Constant Value: "android.media.mediaplayer.frames"

FRAMES_DROPPED

String FRAMES_DROPPED

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

Constant Value: "android.media.mediaplayer.dropped"

HEIGHT

String HEIGHT

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

Constant Value: "android.media.mediaplayer.height"

MIME_TYPE_AUDIO

String MIME_TYPE_AUDIO

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

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

MIME_TYPE_VIDEO

String MIME_TYPE_VIDEO

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

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

PLAYING

String PLAYING

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

Constant Value: "android.media.mediaplayer.playingMs"

WIDTH

String WIDTH

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

Constant Value: "android.media.mediaplayer.width"