JWPlayer
@objc
public protocol JWPlayer : JWPlayerProtocol
This is the public interface into the JWPlayer instance.
-
The delegate to notify about setup errors, warnings, and success when configuring the player.
Note
Set this property before configuring the player in order to receive errors during configuration.Declaration
Swift
var delegate: JWPlayerDelegate? { get set }
-
A delegate which listens for changes in the player’s state.
Declaration
Swift
var playbackStateDelegate: JWPlayerStateDelegate? { get set }
-
A delegate which listens for chapter-related events.
Declaration
Swift
var chaptersDelegate: JWChaptersDelegate? { get set }
-
A delegate which listens for ads events.
Declaration
Swift
var adDelegate: JWAdDelegate? { get set }
-
A delegate which listens for events for video quality, captions, and audio.
Declaration
Swift
var avDelegate: JWAVDelegate? { get set }
-
A delegate which listens for AirPlay events.
Declaration
Swift
var airPlayDelegate: JWAirPlayDelegate? { get set }
-
This closure is called during all ad time events. The current position and duration of the current ad content is supplied as an argument.
Declaration
Swift
var adTimeObserver: ((JWTimeData) -> Void)? { get set }
-
This closure is called during all media playback time events. The current position and duration of the current media content is supplied as an argument.
Declaration
Swift
var mediaTimeObserver: ((JWTimeData) -> Void)? { get set }
-
Delegates that surface different types of metadata from the player.
Declaration
Swift
var metadataDelegates: JWMetadataDelegates { get }
-
A delegate which listens for related events.
Declaration
Swift
var relatedEventDelegate: JWRelatedEventDelegate? { get set }