JWPlayerDelegate
@objc
public protocol JWPlayerDelegate
A protocol which must be used to monitor errors within the JWPlayer instance.
-
When the player is fully initialized, this method is called on the delegate.
Declaration
Swift
func jwplayerIsReady(_ player: JWPlayer)Parameters
playerThe player which initialized successfully.
-
When the player encounters an error with playback, this method is called on the delegate.
Declaration
Swift
func jwplayer(_ player: JWPlayer, failedWithError code: UInt, message: String)Parameters
playerThe player generating the error.
codeThe numerical code representing the error.
messageA human-readable description of the error.
-
When the player encounters an error during setup and initialization, this method is called on the delegate.
Declaration
Swift
func jwplayer(_ player: JWPlayer, failedWithSetupError code: UInt, message: String)Parameters
playerThe player generating the error.
codeThe numerical code representing the error.
messageA human-readable description of the error.
-
When the player encounters a warning within the SDK, this method is called on the delegate.
Declaration
Swift
func jwplayer(_ player: JWPlayer, encounteredWarning code: UInt, message: String)Parameters
playerThe player generating the error.
codeThe numerical code representing the warning.
messageA human-readable description of the warning.
-
When the player encounters an ad warning within the SDK, this method is called on the delegate. Ad warnings do not prevent the ad from continuing to play.
Declaration
Swift
func jwplayer(_ player: JWPlayer, encounteredAdWarning code: UInt, message: String)Parameters
playerThe player generating the warning.
codeThe numerical code representing the ad warning.
messageA human-readable description of the warning.
-
When the player encounters an ad error within the SDK, this method is called on the delegate. Ad errors prevent ads from playing, but do not prevent media playback from continuing.
Declaration
Swift
func jwplayer(_ player: JWPlayer, encounteredAdError code: UInt, message: String)Parameters
playerThe player generating the error.
codeThe numerical code representing the ad error.
messageA human-readable description of the error.
JWPlayerDelegate Protocol Reference