JWPlayerViewControllerRelatedDelegate
@objc
public protocol JWPlayerViewControllerRelatedDelegate
Related UI events within the JWPlayerViewController are routed to this delegate.
-
Reports when the related menu has opened.
Declaration
Swift
func playerViewController(_ controller: JWPlayerViewController, relatedMenuOpenedWithItems items: [JWPlayerItem], withMethod method: JWRelatedInteraction)
Parameters
controller
The JWPlayerViewController related to the event.
items
The playlist items displayed in the related menu.
method
Why the menu closed. Possible values are .user and .contentComplete.
-
Reports when the related menu has closed.
Declaration
Swift
func playerViewController(_ controller: JWPlayerViewController, relatedMenuClosedWithMethod method: JWRelatedInteraction)
Parameters
controller
The JWPlayerViewController related to the event.
method
Why the menu closed. Possible values are .user and .autostart.
-
Reports when content in the related menu has begun playing.
Declaration
Swift
func playerViewController(_ controller: JWPlayerViewController, relatedItemBeganPlaying item: JWPlayerItem, atIndex index: Int, withMethod method: JWRelatedMethod)
Parameters
controller
The JWPlayerViewController related to the event.
item
The playlist item which has begun playing.
index
The index the playlist item was at in the related menu’s feed.
method
How the related item began playing.