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
  • Defines methods that a delegate of a JWCastController object can implement to receive casting callbacks.

    See more

    Declaration

    Swift

    @objc
    public protocol JWCastDelegate
  • An object that can encode itself into a JSONObject representation.

    See more

    Declaration

    Swift

    @objc
    public protocol JWJSONEncodable
  • An object that can decode itself from a JSONObject representation.

    See more

    Declaration

    Swift

    @objc
    public protocol JWJSONDecodable
  • For objects where the decodable pattern is not available, a static factory method can vend an object.

    See more

    Declaration

    Swift

    @objc
    public protocol JWInitializableFromJSON
  • Like NSCopying, but better. A helper protocol for JWPrototypingBuilder.

    Warning

    To conform, make sure that all properties are passed-by-value, or else also conform to this protocol.
    See more

    Declaration

    Swift

    public protocol DeepCopying
  • A set of methods all builders conform to.

    See more

    Declaration

    Swift

    public protocol JWBuilder
  • Undocumented

    See more

    Declaration

    Swift

    public protocol JWPrototypingBuilder : NSObject
  • 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
  • A protocol for classes which are informed about events and requests dealing with content keys for protected content.

    See more

    Declaration

    Swift

    @objc
    public protocol JWDRMContentKeyManager

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
  • Fullscreen events within the JWPlayerViewController are routed to this delegate.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerViewControllerFullScreenDelegate
  • UI events within the JWPlayerViewController are routed to this delegate.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerViewControllerUIDelegate
  • Related UI events within the JWPlayerViewController are routed to this delegate.

    See more

    Declaration

    Swift

    @objc
    public protocol JWPlayerViewControllerRelatedDelegate
  • 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