JWPlaylistItemDelegate
@protocol JWPlaylistItemDelegate <NSObject>
Defines methods for a delegate which responds to events related to a JWPlaylistItem.
-
Fires during playlist item transitions. The transition will be paused until the completion block is called.
Note
The completion block produce 3 outcomes:
- set decision to JWPlaylistItemDecisionContinue to proceed with the playlist item’s load. You may call the block with a null newPlaylistItem.
- set decision to JWPlaylistItemDecisionModify to load a different item or a modified version of the playlist item. You must call the completion block with an instance of JWPlaylistItem.
- set decision to JWPlaylistItemDecisionSkip to reject this playlist item and proceed to the following one. You may call the block with a null newPlaylistItem.
Note
Only fires the first time the playlist item is requested. If the playlist item is replayed, the previous decision will apply. To reset, set the playlistItemDelegate again.
See
JWPlaylistItem
See
JWPlayerController
Declaration
Objective-C
- (void)playlistItem:(JWPlaylistItem *_Nonnull)playlistItem atIndex:(NSInteger)index willLoadAfterCompletion: (void (^_Nonnull)(JWPlaylistItemDecision, JWPlaylistItem *_Nullable))completion;
Parameters
playlistItem
The upcoming playlist item.
index
The index of the upcoming playlist item.
completion
Call this block when you are ready to proceed with the playlist item load.