Class TimeEvent

java.lang.Object
com.jwplayer.pub.api.events.Event
com.jwplayer.pub.api.events.TimeEvent

public class TimeEvent extends Event
Payload that accompanies the onTime() event.

During normal playback, time events fire approximately every 50ms. For DVR (live streams with seekable windows), time events continue to fire at a reduced rate of 500ms while paused. This allows the UI to reflect the playback position falling behind the live edge during pause.

See Also:
  • Constructor Details

    • TimeEvent

      public TimeEvent(JWPlayer player, double position, double duration)
  • Method Details

    • getPosition

      public double getPosition()
      Returns:
      Playback position in seconds.
    • getDuration

      public double getDuration()
      Returns:
      Duration of the current playlist item in seconds.