STSPlayerPlaylistEventDelegate
@protocol STSPlayerPlaylistEventDelegate <NSObject>
Implements the STSPlayerPlaybackEventDelegate protocol to respond to playlist events.
-
Sent when the player view did load an playlist.
Declaration
Objective-C
- (void)playerView:(nonnull STSSDKPlayerView *)playerView didLoadPlaylist:(nonnull STSPlaylist *)playlist;Swift
func playerView(_ playerView: STSSDKPlayerView!, didLoad playlist: STSPlaylist!)Parameters
playerViewThe player view that sent the message.
playlistThe loaded playlist.
-
Sent when the player view is about to play a specific item.
Declaration
Objective-C
- (BOOL)playerView:(nonnull STSSDKPlayerView *)playerView willPlayItemAtIndex:(NSInteger)index;Swift
func playerView(_ playerView: STSSDKPlayerView!, willPlayItemAtIndex index: Any!) -> Any!Parameters
playerViewThe player view that sent the message.
indexThe index of the target item in the current playlist that the player view is going to play.
Return Value
YES if the player view should play the target item, NO if not.
-
Sent when the player view did start playing the target item.
Declaration
Objective-C
- (void)playerView:(nonnull STSSDKPlayerView *)playerView didPlayItemAtIndex:(NSInteger)index;Swift
func playerView(_ playerView: STSSDKPlayerView!, didPlayItemAtIndex index: Any!)Parameters
playerViewThe player view that sent the message.
indexThe index of the played item in the current playlist.
-
Sent when the last item in the playlist has ended.
Declaration
Objective-C
- (void)playerView:(nonnull STSSDKPlayerView *)playerView playListDidPlayToEnd:(nonnull STSPlaylist *)playlist;Swift
func playerView(_ playerView: STSSDKPlayerView!, playListDidPlayToEnd playlist: STSPlaylist!)Parameters
playerViewThe player view that sent the message.
playlistThe playlist that related to this message.
View on GitHub
Install in Dash
STSPlayerPlaylistEventDelegate Protocol Reference