BCOVPlaybackSessionBasicConsumer Protocol Reference

Conforms to NSObject
Declared in BCOVPlaybackController.h

Overview

Conform to this protocol to receive basic playback information for each session.

– didAdvanceToPlaybackSession:

Called when the controller advances to a new playback session, which happens when -advanceToNext is called. When added as a session consume on a playback controller, this method is called with the most recently advanced-to playback session (where applicable).

- (void)didAdvanceToPlaybackSession:(id<BCOVPlaybackSession>)session

Parameters

session

The playback session that was advanced.

Discussion

Called when the controller advances to a new playback session, which happens when -advanceToNext is called. When added as a session consume on a playback controller, this method is called with the most recently advanced-to playback session (where applicable).

Declared In

BCOVPlaybackController.h

– playbackSession:didChangeDuration:

Called when a playback session’s duration is updated. When added as a session consume on a playback controller, this method is called with the most recently updated duration for the session. A session duration can change as the media playback continues to load, as it is refined with more precise information.

- (void)playbackSession:(id<BCOVPlaybackSession>)session didChangeDuration:(NSTimeInterval)duration

Parameters

session

The playback session whose duration changed.

duration

The most recently updated session duration.

Discussion

Called when a playback session’s duration is updated. When added as a session consume on a playback controller, this method is called with the most recently updated duration for the session. A session duration can change as the media playback continues to load, as it is refined with more precise information.

Declared In

BCOVPlaybackController.h

– playbackSession:didChangeExternalPlaybackActive:

Called when a playback session’s external playback active status is updated. When a delegate is set on a playback controller, this method is called with the current external playback active status for the session.

- (void)playbackSession:(id<BCOVPlaybackSession>)session didChangeExternalPlaybackActive:(BOOL)externalPlaybackActive

Parameters

session

The playback session whose external playback status changed.

externalPlaybackActive

Whether external playback is active.

Discussion

Called when a playback session’s external playback active status is updated. When a delegate is set on a playback controller, this method is called with the current external playback active status for the session.

Declared In

BCOVPlaybackController.h

– playbackSession:didPassCuePoints:

Called when a session’s playhead passes cue points registered with its video. This will occur regardless of whether the playhead passes the cue point time for standard progress (playback), or seeking (forward or backward) through the media. When a delegate is set on a playback controller, this method will only be called for future cue point events (any events that have already occurred will not be reported).

- (void)playbackSession:(id<BCOVPlaybackSession>)session didPassCuePoints:(NSDictionary *)cuePointInfo

Parameters

session

The playback session whose cue points were passed.

cuePointInfo

A dictionary of information about the cue point event.

Discussion

Called when a session’s playhead passes cue points registered with its video. This will occur regardless of whether the playhead passes the cue point time for standard progress (playback), or seeking (forward or backward) through the media. When a delegate is set on a playback controller, this method will only be called for future cue point events (any events that have already occurred will not be reported).

If multiple cue points are registered to a time or times that fall between the “previous time” and “current time” for a cue point event, all cue points after the “previous time” and before or on “current time” will be included in the cue point collection. Put differently, multiple cue points at the same time are aggregated into a single cue point event whose collection will contain all of those cue points. The most likely scenario in which this would happen is when seeking across a time range that includes multiple cue points (potentially at different times) – this will result in a single cue point event whose previous time is the point at which seek began, whose current time is the destination of the seek, and whose cue points are all of the cue points whose time fell within that range.

The cuePointInfo dictionary will contain the following keys and values for each cue point event:

kBCOVPlaybackSessionEventKeyPreviousTime: the progress interval immediately preceding the cue points for which this event was received. kBCOVPlaybackSessionEventKeyCurrentTime: the progress interval on or immediately after the cue points for which this event was received. kBCOVPlaybackSessionEventKeyCuePoints: the BCOVCuePointCollection of cue points for which this event was received.

Declared In

BCOVPlaybackController.h

– playbackSession:didProgressTo:

Called with the playback session’s playback progress. As the session’s media plays, this method is called periodically with the latest progress interval. When a delegate is set on a playback controller, this method will only be called with progress information that has not yet occurred.

- (void)playbackSession:(id<BCOVPlaybackSession>)session didProgressTo:(NSTimeInterval)progress

Parameters

session

The playback session making progress.

progress

The time interval of the session’s current playback progress.

Discussion

Called with the playback session’s playback progress. As the session’s media plays, this method is called periodically with the latest progress interval. When a delegate is set on a playback controller, this method will only be called with progress information that has not yet occurred.

Declared In

BCOVPlaybackController.h

– didCompletePlaylist:

Called when the end of the video playlist has been reached, after the the last video (including post-rolls) has played to the end. Only called when autoAdvance is set to YES on the playback controller.

- (void)didCompletePlaylist:(id<NSFastEnumeration>)playlist

Parameters

playlist

The list of BCOVVideo objects that were played. Do not assume that this is an NSArray.

Discussion

Called when the end of the video playlist has been reached, after the the last video (including post-rolls) has played to the end. Only called when autoAdvance is set to YES on the playback controller.

Declared In

BCOVPlaybackController.h

– playbackSession:didReceiveLifecycleEvent:

Called when a playback session receives a lifecycle event. This method is called only for lifecycle events that occur after the delegate is set (previous lifecycle events will not be buffered/delivered to the delegate).

- (void)playbackSession:(id<BCOVPlaybackSession>)session didReceiveLifecycleEvent:(BCOVPlaybackSessionLifecycleEvent *)lifecycleEvent

Parameters

session

The playback session whose lifecycle events were received.

lifecycleEvent

The lifecycle event received by the session.

Discussion

Called when a playback session receives a lifecycle event. This method is called only for lifecycle events that occur after the delegate is set (previous lifecycle events will not be buffered/delivered to the delegate).

The lifecycle event types are listed along with the BCOVPlaybackSessionLifecycleEvent class.

Declared In

BCOVPlaybackController.h

– playbackSession:didChangeSeekableRanges:

Called when a playback session’s seekable ranges is updated. When added as a session consume on a playback controller, this method is called with the most recently updated seekable ranges for the session. A session seekable ranges can change as the media playback continues to load.

- (void)playbackSession:(id<BCOVPlaybackSession>)session didChangeSeekableRanges:(NSArray *)seekableRanges

Parameters

session

The playback session whose seekable ranges changed.

seekableRanges

An array of NSValue about the most recently updated session seekableRanges.

Discussion

Called when a playback session’s seekable ranges is updated. When added as a session consume on a playback controller, this method is called with the most recently updated seekable ranges for the session. A session seekable ranges can change as the media playback continues to load.

Declared In

BCOVPlaybackController.h