BCOVPlaybackSession Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | BCOVPlaybackSession.h |
Overview
A playback session represents the playback of a single video. The session provides a single point of access for everything related to the playback experience for that video: the video and source selected for playback, the player within which the playback occurs, and events that occur during the playback session. Playback sessions are never reused for multiple videos (even separate enqueueings of the same video).
video
required method
The video whose playback this session represents.
@property (nonatomic, readonly, copy) BCOVVideo *videoDiscussion
The video whose playback this session represents.
Declared In
BCOVPlaybackSession.h
source
required method
The source in self.video this session uses to load content.
@property (nonatomic, readonly, copy) BCOVSource *sourceDiscussion
The source in self.video this session uses to load content.
Declared In
BCOVPlaybackSession.h
player
required method
The player this session uses to present content.
@property (nonatomic, readonly, strong) AVQueuePlayer *playerDiscussion
The player this session uses to present content.
Declared In
BCOVPlaybackSession.h
playerLayer
required method
audibleMediaSelectionGroup
required method
The AVMediaSelectionGroup of audible media selection options of the AVAsset of the AVPlayerItem of the AVPlayer of the current BCOVPlaybackSession.
@property (nonatomic, readonly) AVMediaSelectionGroup *audibleMediaSelectionGroupDiscussion
The AVMediaSelectionGroup of audible media selection options of the AVAsset of the AVPlayerItem of the AVPlayer of the current BCOVPlaybackSession.
The AVMediaSelectionGroup is unsorted and can contain un-playable options. Use the +playableMediaSelectionOptionsFromArray: class method of AVMediaSeledtionGroup to return the list of playable media options. AVMediaSelectionGroup provides filtering methods to, for example, order the list of options according to the user’s language preferences.
Declared In
BCOVPlaybackSession.h
selectedAudibleMediaOption
required method
The selected audible media option. When setting this property, if selectedAudibleMediaOption is not a member of the AVMediaSelectionGroup of the current BCOVPlaybackSession’s AVPlayer, no change in presentation state will occur.
@property (nonatomic, readwrite) AVMediaSelectionOption *selectedAudibleMediaOptionDiscussion
The selected audible media option. When setting this property, if selectedAudibleMediaOption is not a member of the AVMediaSelectionGroup of the current BCOVPlaybackSession’s AVPlayer, no change in presentation state will occur.
Declared In
BCOVPlaybackSession.h
legibleMediaSelectionGroup
required method
The AVMediaSelectionGroup of legible media selection options of the AVAsset of the AVPlayerItem of the AVPlayer of the current BCOVPlaybackSession.
@property (nonatomic, readonly) AVMediaSelectionGroup *legibleMediaSelectionGroupDiscussion
The AVMediaSelectionGroup of legible media selection options of the AVAsset of the AVPlayerItem of the AVPlayer of the current BCOVPlaybackSession.
The AVMediaSelectionGroup is unsorted and can contain un-playable options. Use the +playableMediaSelectionOptionsFromArray: class method of AVMediaSelectionGroup to return the list of playable media options. AVMediaSelectionOption provides filtering methods to, for example, exclude forced subtitles from the legible options that are suitable to offer in a selection UI.
Declared In
BCOVPlaybackSession.h
selectedLegibleMediaOption
required method
The selected legible media option. When setting this property, if selectedLegibleMediaOption is not a member of the AVMediaSelectionGroup of the current BCOVPlaybackSession’s AVPlayer, no change in presentation state will occur. If selectedLegibleMediaOption is set to nil and the allowsEmptySelecton property of the AVMediaSelectionGroup of the current BCOVPlaybackSession’s AVPlayer is YES, all media selection options in the group will be deselected.
@property (nonatomic, readwrite) AVMediaSelectionOption *selectedLegibleMediaOptionDiscussion
The selected legible media option. When setting this property, if selectedLegibleMediaOption is not a member of the AVMediaSelectionGroup of the current BCOVPlaybackSession’s AVPlayer, no change in presentation state will occur. If selectedLegibleMediaOption is set to nil and the allowsEmptySelecton property of the AVMediaSelectionGroup of the current BCOVPlaybackSession’s AVPlayer is YES, all media selection options in the group will be deselected.
Declared In
BCOVPlaybackSession.h
providerExtension
required method
The session provider extension for this session. The default value is nil.
@property (nonatomic, readonly, strong) BCOVSessionProviderExtension *providerExtensionDiscussion
The session provider extension for this session. The default value is nil.
If a BCOVPlaybackSessionProvider is used that needs to expose plugin specific functionality, this property will return a BCOVSessionProviderExtension.
Declared In
BCOVPlaybackSession.h
– selectAudibleMediaOptionAutomatically
required method
Selects the audible media option in the audible media selection group that best matches the current AVPlayerItem’s automatic selection criteria.
- (void)selectAudibleMediaOptionAutomaticallyDiscussion
Selects the audible media option in the audible media selection group that best matches the current AVPlayerItem’s automatic selection criteria.
Declared In
BCOVPlaybackSession.h
– selectLegibleMediaOptionAutomatically
required method
Selects the legible media option in the legible media selection group which best matches the current AVPlayerItem’s automatic selection criteria.
- (void)selectLegibleMediaOptionAutomaticallyDiscussion
Selects the legible media option in the legible media selection group which best matches the current AVPlayerItem’s automatic selection criteria.
Declared In
BCOVPlaybackSession.h
– displayNameFromAudibleMediaSelectionOption:
required method
Returns a descriptive display string for the audible selection option. The display name string is the stringValue of the option appended with the option locale if the locale differs from the stringValue.
- (NSString *)displayNameFromAudibleMediaSelectionOption:(AVMediaSelectionOption *)optionParameters
option |
A specific audio media selection option from the AVMediaSelectionGroup |
|---|
Discussion
Returns a descriptive display string for the audible selection option. The display name string is the stringValue of the option appended with the option locale if the locale differs from the stringValue.
Declared In
BCOVPlaybackSession.h
– displayNameFromLegibleMediaSelectionOption:
required method
Returns a descriptive display string for the legible selection option. The display name string is the stringValue of the option appended with the option locale if the locale differs from the stringValue. Legible option names are further appended with “SDH” when accessibility characteristics are present.
- (NSString *)displayNameFromLegibleMediaSelectionOption:(AVMediaSelectionOption *)optionParameters
option |
A specific legible media selection option from the AVMediaSelectionGroup |
|---|
Discussion
Returns a descriptive display string for the legible selection option. The display name string is the stringValue of the option appended with the option locale if the locale differs from the stringValue. Legible option names are further appended with “SDH” when accessibility characteristics are present.
Declared In
BCOVPlaybackSession.h
– terminate
required method
Terminates this playback session, indicating readiness for a new session to be dequeued. A terminated playback session should be discarded immediately.
- (void)terminateDiscussion
Terminates this playback session, indicating readiness for a new session to be dequeued. A terminated playback session should be discarded immediately.
In a typical configuration using a BCOVPlaybackController, there is no need to call this method directly. Methods on the controller are the preferred mechanism for advancing to the next playback session. However, playback session provider configurations which do not use a BCOVPlaybackController may need to invoke this method to advance the queue.
Declared In
BCOVPlaybackSession.h