Package com.castlabs.sdk.debug.metric

# Class SelectedQualityMetric

java.lang.Object
com.castlabs.sdk.debug.metric.Metric
com.castlabs.sdk.debug.metric.SelectedQualityMetric

All Implemented Interfaces:
  `TrackSelectionListener`

public class SelectedQualityMetric extends Metric implements TrackSelectionListener
Provides a Metric of the currently selected Video quality.

Since:
  4.2.0

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.castlabs.sdk.debug.metric.Metric

  `Metric.Plotter`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SelectedQualityMetric(int color, com.github.mikephil.charting.components.YAxis.AxisDependency axisDependency)`
  Creates a new instance of SelectedQualityMetric with the specified color and axis dependency.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onAudioTrackChanged(AudioTrack audioTrack)`
  `void`
  `onSubtitleTrackChanged(SubtitleTrack subtitleTrack)`
  `void`
  `onVideoQualitySelectionChanged(VideoTrackQuality videoTrackQuality, int reason, String switchDescription, long bufferedDurationUs, long bitrateEstimate)`
  `void`
  `onVideoTrackChanged(VideoTrack videoTrack)`

  ### Methods inherited from class com.castlabs.sdk.debug.metric.Metric

  `attach, detach, getDataSet`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SelectedQualityMetric

    public SelectedQualityMetric(int color, com.github.mikephil.charting.components.YAxis.AxisDependency axisDependency)
    Creates a new instance of SelectedQualityMetric with the specified color and axis dependency.
    Parameters:
      `color` - The color for the metric line.
      `axisDependency` - The axis dependency for the metric.

- ## Method Details

  - ### onVideoQualitySelectionChanged

    public void onVideoQualitySelectionChanged(@NonNull VideoTrackQuality videoTrackQuality, int reason, @Nullable String switchDescription, long bufferedDurationUs, long bitrateEstimate)
    Specified by:
      `onVideoQualitySelectionChanged` in interface `TrackSelectionListener`

  - ### onVideoTrackChanged

    public void onVideoTrackChanged(@Nullable VideoTrack videoTrack)
    Specified by:
      `onVideoTrackChanged` in interface `TrackSelectionListener`

  - ### onAudioTrackChanged

    public void onAudioTrackChanged(@Nullable AudioTrack audioTrack)
    Specified by:
      `onAudioTrackChanged` in interface `TrackSelectionListener`

  - ### onSubtitleTrackChanged

    public void onSubtitleTrackChanged(@Nullable SubtitleTrack subtitleTrack)
    Specified by:
      `onSubtitleTrackChanged` in interface `TrackSelectionListener`