Protocols

The following protocols are available globally.

  • A delegate which will receive ad events.

    See more

    Declaration

    Swift

    @objc
    public protocol JWAdDelegate
  • This manager provides methods to modify the existing list of friendly obstructions.

    See more

    Declaration

    Swift

    @objc
    public protocol JWFriendlyObstructionManager
  • Objects which need the ability to be converted into JSON conform to this protocol.

    See more

    Declaration

    Swift

    @objc
    public protocol JWJSONEncodable
  • A set of methods all builders conform to.

    See more

    Declaration

    Swift

    public protocol JWBuilder
  • This dataSource requests the necessary data to decrypt protected content following the DRM standard.

    Note

    Currently, only Apple FairPlay Streaming (FPS) protocol is supported.
    See more

    Declaration

    Swift

    @objc
    public protocol JWDRMContentKeyDataSource

Player Event Delegates

  • This delegate reports events based on the player’s state.

    Play Events

    A handful of different events are reported when a play event is happening. These events happen in this order:

    • isAttemptingToPlay
    • willPlayWithReason
    • isPlayingWithReason
    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerStateDelegate
  • This delegate listens for audio events.

    See more

    Declaration

    Swift

    @objc
    public protocol JWAVDelegate
  • Reports AirPlay events

    See more

    Declaration

    Swift

    @objc
    public protocol JWAirPlayDelegate
  • A protocol for listening to time events through the JWPlayerViewController.

    See more

    Declaration

    Swift

    @objc
    public protocol JWTimeEventListener
  • A protocol for listening to chapter events.

    These events are triggered by the time values specified within the chapter media track VTT file. In order for the chapter beginning and ending events to be as accurate as possible, it is advisable that the chapter media track file define the chapters with accurate beginning and ending time values.

    See more

    Declaration

    Swift

    @objc
    public protocol JWChaptersDelegate
  • A protocol listening for related events.

    See more

    Declaration

    Swift

    @objc
    public protocol JWRelatedEventDelegate
  • A protocol which must be used to monitor errors within the JWPlayer instance.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerDelegate
  • Methods and properties for interfacing with the player to control it, and query information.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerProtocol
  • This is the public interface into the JWPlayer instance.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayer : JWPlayerProtocol
  • Listens for new access log data from the player item

    See more

    Declaration

    Swift

    @objc
    public protocol JWAccessLogMetadataDelegate
  • Listens for date range metadata events during playback.

    See more

    Declaration

    Swift

    @objc
    public protocol JWDateRangeMetadataDelegate
  • Listens for metadata events defined by the developer during playback.

    See more

    Declaration

    Swift

    @objc
    public protocol JWExternalMetadataDelegate
  • Listens for ID3 metadata events during playback.

    See more

    Declaration

    Swift

    @objc
    public protocol JWID3MetadataDelegate
  • Listens for media metadata when the video is done loading

    See more

    Declaration

    Swift

    @objc
    public protocol JWMediaMetadataDelegate
  • Listens for program-date-time metadata events during playback.

    See more

    Declaration

    Swift

    @objc
    public protocol JWProgramDateTimeMetadataDelegate
  • Events within the JWCinematicViewController are routed to this delegate.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerCinematicViewControllerDelegate
  • Methods and properties for interfacing with the view of a JWPlayer instance.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerViewProtocol
  • A delegate for receiving information on changes to the JWPlayerView.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerViewDelegate