public final class

MediaPlayer.MetricsConstants

extends java.lang.Object

 java.lang.Object

↳androidx.media2.player.MediaPlayer.MetricsConstants

Overview

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

Summary

Fields
public static final java.lang.StringCODEC_AUDIO

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

public static final java.lang.StringCODEC_VIDEO

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

public static final java.lang.StringDURATION

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

public static final java.lang.StringERROR_CODE

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

public static final java.lang.StringERRORS

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

public static final java.lang.StringFRAMES

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

public static final java.lang.StringFRAMES_DROPPED

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

public static final java.lang.StringHEIGHT

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

public static final java.lang.StringMIME_TYPE_AUDIO

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

public static final java.lang.StringMIME_TYPE_VIDEO

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

public static final java.lang.StringPLAYING

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

public static final java.lang.StringWIDTH

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

Methods
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final java.lang.String MIME_TYPE_VIDEO

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

public static final java.lang.String CODEC_VIDEO

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

public static final java.lang.String WIDTH

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

public static final java.lang.String HEIGHT

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

public static final java.lang.String FRAMES

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

public static final java.lang.String FRAMES_DROPPED

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

public static final java.lang.String MIME_TYPE_AUDIO

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

public static final java.lang.String CODEC_AUDIO

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

public static final java.lang.String DURATION

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

public static final java.lang.String PLAYING

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

public static final java.lang.String ERRORS

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

public static final java.lang.String ERROR_CODE

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