BCOVVideo Class Reference
Inherits from | NSObject |
---|---|
Conforms to | BCOVVideo NSCopying |
Declared in | BCOVVideo.h |
usesFairPlay
Returns YES if this video object has a source using FairPlay encryption This applies to videos retrieved from Dynamic Delivery accounts only.
@property (nonatomic, readonly) BOOL usesFairPlay
Discussion
Returns YES if this video object has a source using FairPlay encryption This applies to videos retrieved from Dynamic Delivery accounts only.
Declared In
BCOVVideo.h
offline
Returns YES if this instance refers to an offline video.
Use the playableOffline
property to determine if the
video is playable offline.
@property (nonatomic, readonly) BOOL offline
Discussion
Returns YES if this instance refers to an offline video.
Use the playableOffline
property to determine if the
video is playable offline.
Declared In
BCOVVideo.h
playableOffline
Determines if a complete rendition of an AVAsset is available to be played without a network connection.
@property (nonatomic, readonly) BOOL playableOffline
Return Value
Returns YES if this instance refers to an offline video playable from the device’s local storage without a network connection.
Returns NO if the video has not completed downloading, or if the video has been purged and needs to be re-downloaded. This happens automatically if iOS needs to reclaim storage space for proper functioning of the device.
On some versions of iOS playableOffline
may return NO if the offline video is already
loaded up in an instance of AVPlayer. Calling removeAllItems
on the current instance of AVQueuePlayer
prior to checking
should result in the expected value of TRUE being returned.
Discussion
Query this property before presenting or attempting to play an offline asset to determine if it’s available for use. A return value of true indicates a complete rendition of this asset is available for offline playback.
Reading this property is equivalent to reading the playableOffline property of the AVAssetCache of an AVAsset.
Declared In
BCOVVideo.h
errorCode
A string representation of an error code for an unplayable video
@property (nonatomic, copy, nullable) NSString *errorCode
Discussion
A string representation of an error code for an unplayable video
Declared In
BCOVVideo.h
errorSubCode
A string representation of an error sub code for an unplayable video
@property (nonatomic, copy, nullable) NSString *errorSubCode
Discussion
A string representation of an error sub code for an unplayable video
Declared In
BCOVVideo.h
errorMessage
A error emssage string for an unplayable video
@property (nonatomic, copy, nullable) NSString *errorMessage
Discussion
A error emssage string for an unplayable video
Declared In
BCOVVideo.h
hasError
Returns NO if errorCode
, errorSubCode
and errorMessage
are all nil
otherwise if any of those properties have a vaile will return YES
@property (nonatomic, readonly) BOOL hasError
Discussion
Returns NO if errorCode
, errorSubCode
and errorMessage
are all nil
otherwise if any of those properties have a vaile will return YES
Declared In
BCOVVideo.h
– initWithSources:cuePoints:properties:
Constructs a new video with the specified sources, cue points, and properties.
- (instancetype)initWithSources:(nullable NSArray<BCOVSource*> *)sources cuePoints:(nullable BCOVCuePointCollection *)cuePoints properties:(nullable NSDictionary *)properties
Parameters
sources |
The sources of this video. |
---|---|
cuePoints |
The cue points associated to this video. |
properties |
The metadata or properties associated to this video. |
Return Value
A new video with the specified sources, cue points, and properties.
Discussion
When using this initializer you can take advantage of the kBCOVVideoPropertyKey constants to create the properties dictionary. You can find constants for the keys that this SDK uses with this dictionary near the top of this header file.
Declared In
BCOVVideo.h
– initWithSource:cuePoints:properties:
Constructs a new video with a single specified source, the specified cue points, and the specified properties.
- (instancetype)initWithSource:(nullable BCOVSource *)source cuePoints:(nullable BCOVCuePointCollection *)cuePoints properties:(nullable NSDictionary *)properties
Parameters
source |
The sole source of this video. |
---|---|
cuePoints |
The cue points associated to this video. |
properties |
The metadata or properties associated to this video. |
Return Value
A new video with a single source, as well as the specified cue points and properties.
Discussion
Constructs a new video with a single specified source, the specified cue points, and the specified properties.
When using this initializer you can take advantage of the kBCOVVideoPropertyKey constants to create the properties dictionary. You can find constants for the keys that this SDK uses with this dictionary near the top of this header file.
Declared In
BCOVVideo.h
– initWithErrorCode:errorSubCode:errorMessage:properties:
Constructs a new video with with error information.
- (instancetype)initWithErrorCode:(nullable NSString *)errorCode errorSubCode:(nullable NSString *)errorSubCode errorMessage:(nullable NSString *)errorMessage properties:(nullable NSDictionary *)properties
Parameters
errorCode |
The error code |
---|---|
errorSubCode |
The error sub-code |
errorMessage |
The error message |
properties |
The metadata or properties associated to this video. |
Return Value
A new video with error information attributes
Discussion
Constructs a new video with with error information.
When attempting to retreive a video the server may an error. The error may be caused due to various restrictions other reasons. The information is stored on the BCOVideo object for informative purposes.
Declared In
BCOVVideo.h
– isEqualToVideo:
Returns YES if video
is equivalent to this instance.
- (BOOL)isEqualToVideo:(nullable BCOVVideo *)video
Parameters
video |
The video to test for equivalence with this instance. |
---|
Return Value
Whether video
is equivalent to this instance.
Discussion
Returns YES if video
is equivalent to this instance.
Declared In
BCOVVideo.h
– variantForPreferredLanguage:
Loops through language variants on this video and attempt to match it with one of the languages provided.
- (NSDictionary *)variantForPreferredLanguage:(nullable NSArray *)preferredLanguages
Discussion
Loops through language variants on this video and attempt to match it with one of the languages provided.
The first match found will be returned.
If no result is found a nil
value is returned.
@property preferredLanguages Array of preferred languages with which
to attempt a match. Use with NSLocale.preferredLanguages
Declared In
BCOVVideo.h
+ videoWithURL:
Returns a new video with a single source containing the specified URL.
+ (BCOVVideo *)videoWithURL:(NSURL *)url
Parameters
url |
The URL of the source to be created and associated to the new video. |
---|
Return Value
A new video with a source containing the specified URL.
Discussion
Returns a new video with a single source containing the specified URL.
Declared In
BCOVVideo.h
+ videoWithHLSSourceURL:
Returns a new video with a single source containing the specified URL and a delivery method as kBCOVSourceDeliveryHLS.
+ (BCOVVideo *)videoWithHLSSourceURL:(NSURL *)url
Parameters
url |
The URL of the source to be created and associated to the new video. |
---|
Return Value
A new video with a source containing the specified URL.
Discussion
Returns a new video with a single source containing the specified URL and a delivery method as kBCOVSourceDeliveryHLS.
Declared In
BCOVVideo.h
+ videoWithURL:deliveryMethod:
Returns a new video with a single source containing the specified URL.
+ (BCOVVideo *)videoWithURL:(NSURL *)url deliveryMethod:(nullable NSString *)deliveryMethod
Parameters
url |
The URL of the source to be created and associated to the new video. |
---|---|
deliveryMethod |
The delivery method for this source. See BCOVSource for options. |
Return Value
A new video with a source containing the specified URL.
Discussion
Returns a new video with a single source containing the specified URL.
Declared In
BCOVVideo.h