JWTimeEventListener

@objc
public protocol JWTimeEventListener

A protocol for listening to time events through the JWPlayerViewController.

  • This callback is triggered when a time event fires for the media.

    When this is triggered, both a duration and position are supplied. This event does not fire when an ad is playing. If you are overriding this method, you must call the super method.

    Declaration

    Swift

    func onMediaTimeEvent(_ time: JWTimeData)

    Parameters

    time

    The position and duration of the currently playing media.

  • This callback is triggered when a time event fires for a currently playing ad.

    When this is triggered, both a duration and position within the ad are supplied. This event only fires when an ad is playing. If you are overriding this method, you must call the super method.

    Declaration

    Swift

    func onAdTimeEvent(_ time: JWTimeData)

    Parameters

    time

    The position and duration of the currently playing ad.