Interface DurationChangeEvent

  • All Implemented Interfaces:
    com.theoplayer.android.api.event.Event , com.theoplayer.android.api.event.player.PlayerEvent

    
    public interface DurationChangeEvent
     implements PlayerEvent<E>
                        

    Fired when DURATIONCHANGE occurs for the Player.

    Example:

    • One of the cases where the duration is updated, is when you set a new source.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Double getDuration() The new duration of the content.
      • Methods inherited from class com.theoplayer.android.api.event.Event

        getDate, getType
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getDuration

        @NonNull() abstract Double getDuration()

        The new duration of the content.

        • Returns 0 if the duration is unknown.
        • Returns Double.NaN for a LIVE stream.
        Returns:

        The new duration, in seconds. (NonNull)