Class PlayerMetricChart

    • Constructor Detail

      • PlayerMetricChart

        public PlayerMetricChart​(Context context)
      • PlayerMetricChart

        public PlayerMetricChart​(Context context,
                                 AttributeSet attrs,
                                 int defStyle)
    • Method Detail

      • enableMetrics

        public void enableMetrics​(int metrics)
        Enables the specified Metrics. Should be one or more of PlayerMetricChart.MetricType
        Parameters:
        metrics - Metrics to enable
      • isMetricEnabled

        public boolean isMetricEnabled​(int metric)
        Whether a certain Metric is enabled or not
        Parameters:
        metric - the Metric to test
        Returns:
        whether the provided Metric is enabled or not
      • setRenderUpdateInterval

        public void setRenderUpdateInterval​(int renderUpdateInterval)
        Adjust how often the View is redrawn
        Parameters:
        renderUpdateInterval - period between updates in milliseconds
      • showQualitiesAxis

        public void showQualitiesAxis​(@Nullable
                                      com.github.mikephil.charting.components.YAxis.AxisDependency axisDependency)
        Enables Video qualities plotting. This will overlay the video qualities as horizontal lines bound to the specified axis.
        Parameters:
        axisDependency - axis which to bound the qualities to.
      • addMetric

        public void addMetric​(Metric metric)
        Adds a Metric to be drawn in this Chart.
        Parameters:
        metric - Metric to add
      • setPlayerController

        public void setPlayerController​(@NonNull
                                        PlayerController playerController)
        Description copied from interface: PlayerChart
        Sets the player controller to which to bind and extract data from.
        Specified by:
        setPlayerController in interface PlayerChart
        Parameters:
        playerController - PlayerController where to get the data from.
      • unsetPlayerController

        public void unsetPlayerController()
        Description copied from interface: PlayerChart
        Performs all the necessary cleanup and removes the previously set listeners (if any).
        Specified by:
        unsetPlayerController in interface PlayerChart
      • requestPlot

        public void requestPlot​(Metric metric)
        Description copied from interface: Metric.Plotter
        The metric needs to be redrawn. Probably due to data change
        Specified by:
        requestPlot in interface Metric.Plotter
        Parameters:
        metric - Metric to draw
      • getMaximumDataAgeMs

        public long getMaximumDataAgeMs()
        Description copied from interface: Metric.Plotter
        Maximum time data should be kept. Used to remove old data points.
        Specified by:
        getMaximumDataAgeMs in interface Metric.Plotter
        Returns:
        time data should be kept
      • setMaximumDataAgeMs

        public void setMaximumDataAgeMs​(long maximumDataAgeMs)
        How much time the data should be kept and drawn.
        Parameters:
        maximumDataAgeMs - Maximum data age in milliseconds