BCOVPlaybackService Class Reference

Inherits from NSObject
Declared in BCOVPlaybackService.h

Overview

The BCOVPlaybackService class provides asynchronous methods for retrieving information about videos from Brightcove’s Playback API.

  sharedURLSession

NSURLSession shared across all network calls to the BCOVPlaybackService. This object is created when the Playback Service is initialized. If you wish to use your own NSURLSession you can set it here. If set to nil, the default NSURLSession will be re-created.

@property (nonatomic, strong) NSURLSession *sharedURLSession

Discussion

NSURLSession shared across all network calls to the BCOVPlaybackService. This object is created when the Playback Service is initialized. If you wish to use your own NSURLSession you can set it here. If set to nil, the default NSURLSession will be re-created.

Declared In

BCOVPlaybackService.h

  watermarkingToken

The watermarking token for use with Forensic Watermarking

@property (nonatomic, copy) NSString *watermarkingToken

Discussion

The watermarking token for use with Forensic Watermarking

Declared In

BCOVPlaybackService.h

– initWithAccountId:policyKey:

Initializes a BCOVPlaybackService. It uses the accountId and policyKey to create a BCOVPlaybackServiceRequestFactory internally.

- (instancetype)initWithAccountId:(NSString *)accountId policyKey:(NSString *)policyKey

Parameters

accountId

Account Id to be used for each request. Must not be nil.

policyKey

PolicyKey to be used for each request. May be nil.

Return Value

An initialized instance.

Discussion

Initializes a BCOVPlaybackService. It uses the accountId and policyKey to create a BCOVPlaybackServiceRequestFactory internally.

If using the Edge Playback Service, the policyKey value should be nil

Declared In

BCOVPlaybackService.h

– initWithRequestFactory:

Initializes a BCOVPlaybackService with a required BCOVPlaybackServiceRequestFactory.

- (instancetype)initWithRequestFactory:(BCOVPlaybackServiceRequestFactory *)requestFactory

Parameters

requestFactory

Request Factory to use for creating URL requests.

Return Value

An initialized instance.

Discussion

Initializes a BCOVPlaybackService with a required BCOVPlaybackServiceRequestFactory.

Declared In

BCOVPlaybackService.h

– findPlaylistWithConfiguration:queryParameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

- (void)findPlaylistWithConfiguration:(NSDictionary *)configuration queryParameters:(NSDictionary *)queryParameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

configuration

NSDictionary of configuration options used in this catalog request. Valid parameters are: kBCOVPlaybackServiceConfigurationKeyPlaylistID kBCOVPlaybackServiceConfigurationKeyPlaylistReferenceID kBCOVPlaybackServiceConfigurationKeyAuthToken kBCOVPlaybackServiceConfigurationKeyBumperID

queryParameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict. Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithConfiguration:queryParameters:completion:

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

- (void)findVideoWithConfiguration:(NSDictionary *)configuration queryParameters:(NSDictionary *)queryParameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

configuration

NSDictionary of configuration options used in this catalog request. Valid parameters are: kBCOVPlaybackServiceConfigurationKeyVideoID kBCOVPlaybackServiceConfigurationKeyVideoReferenceID kBCOVPlaybackServiceConfigurationKeyAuthToken kBCOVPlaybackServiceConfigurationKeyBumperID

queryParameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

– findPlaylistWithPlaylistID:parameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

- (void)findPlaylistWithPlaylistID:(NSString *)playlistID parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

playlistID

The ID of the playlist to find.

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict. Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findPlaylistWithPlaylistID:bumperID:parameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

- (void)findPlaylistWithPlaylistID:(NSString *)playlistID bumperID:(NSString *)bumperID parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

playlistID

The ID of the playlist to find.

bumperID

The ID of the bumper video.

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict. Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findPlaylistWithPlaylistID:authToken:parameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

- (void)findPlaylistWithPlaylistID:(NSString *)playlistID authToken:(NSString *)authToken parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

playlistID

The ID of the playlist to find.

authToken

The authorization token with which to validate the video’s license

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict. Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findPlaylistWithPlaylistID:bumperID:authToken:parameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

- (void)findPlaylistWithPlaylistID:(NSString *)playlistID bumperID:(NSString *)bumperID authToken:(NSString *)authToken parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

playlistID

The ID of the playlist to find.

bumperID

The ID of the bumper video.

authToken

The authorization token with which to validate the video’s license

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict. Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its playlist ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findPlaylistWithReferenceID:parameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its reference ID on a background queue.

- (void)findPlaylistWithReferenceID:(NSString *)referenceID parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

referenceID

The reference ID of the video to find.

parameters

Additional NSString query parameters to add to the Playback Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above. API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its reference ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findPlaylistWithReferenceID:bumperReferenceID:parameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its reference ID on a background queue.

- (void)findPlaylistWithReferenceID:(NSString *)referenceID bumperReferenceID:(NSString *)bumperReferenceID parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

referenceID

The reference ID of the video to find.

bumperReferenceID

The reference ID of the bumper video.

parameters

Additional NSString query parameters to add to the Playback Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above. API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its reference ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findPlaylistWithReferenceID:authToken:parameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its reference ID on a background queue.

- (void)findPlaylistWithReferenceID:(NSString *)referenceID authToken:(NSString *)authToken parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

referenceID

The reference ID of the video to find.

authToken

The authorization token with which to validate the video’s license

parameters

Additional NSString query parameters to add to the Playback Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above. API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its reference ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findPlaylistWithReferenceID:bumperReferenceID:authToken:parameters:completion:

Retrieves a BCOVPlaylist from the Playback API service by its reference ID on a background queue.

- (void)findPlaylistWithReferenceID:(NSString *)referenceID bumperReferenceID:(NSString *)bumperReferenceID authToken:(NSString *)authToken parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVPlaylist *playlist , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

referenceID

The reference ID of the video to find.

bumperReferenceID

The reference ID of the bumper video.

authToken

The authorization token with which to validate the video’s license

parameters

Additional NSString query parameters to add to the Playback Can use the kBCOVPlaybackServiceParameterKeyOffset and kBCOVPlaybackServiceParameterKeyLimit parameters. See “Playlist Paging” above. API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVPlaylist from the Playback API service by its reference ID on a background queue.

If the completionHandler provides an NSError, the BCOVPlaylist will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithVideoID:parameters:completion:

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

- (void)findVideoWithVideoID:(NSString *)videoID parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

videoID

The ID of the video to find.

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithVideoID:bumperID:parameters:completion:

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

- (void)findVideoWithVideoID:(NSString *)videoID bumperID:(NSString *)bumperID parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

videoID

The ID of the video to find.

bumperID

The ID of the bumper video.

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithVideoID:authToken:parameters:completion:

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

- (void)findVideoWithVideoID:(NSString *)videoID authToken:(NSString *)authToken parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

videoID

The ID of the video to find.

authToken

The authorization token with which to validate the video’s license

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithVideoID:bumperID:authToken:parameters:completion:

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

- (void)findVideoWithVideoID:(NSString *)videoID bumperID:(NSString *)bumperID authToken:(NSString *)authToken parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

videoID

The ID of the video to find.

bumperID

The ID of the bumper video.

authToken

The authorization token with which to validate the video’s license

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its video ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithReferenceID:parameters:completion:

Retrieves a BCOVVideo from the Playback API service by its reference ID on a background queue.

- (void)findVideoWithReferenceID:(NSString *)referenceID parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

referenceID

The reference ID of the video to find.

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its reference ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithReferenceID:bumperReferenceID:parameters:completion:

Retrieves a BCOVVideo from the Playback API service by its reference ID on a background queue.

- (void)findVideoWithReferenceID:(NSString *)referenceID bumperReferenceID:(NSString *)bumperReferenceID parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

referenceID

The reference ID of the video to find.

bumperReferenceID

The reference ID of the bumper video.

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its reference ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithReferenceID:authToken:parameters:completion:

Retrieves a BCOVVideo from the Playback API service by its reference ID on a background queue.

- (void)findVideoWithReferenceID:(NSString *)referenceID authToken:(NSString *)authToken parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

referenceID

The reference ID of the video to find.

authToken

The authorization token with which to validate the video’s license

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its reference ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

– findVideoWithReferenceID:bumperReferenceID:authToken:parameters:completion:

Retrieves a BCOVVideo from the Playback API service by its reference ID on a background queue.

- (void)findVideoWithReferenceID:(NSString *)referenceID bumperReferenceID:(NSString *)bumperReferenceID authToken:(NSString *)authToken parameters:(NSDictionary *)parameters completion:(void ( ^ ) ( BCOVVideo *video , NSDictionary *jsonResponse , NSError *error ))completionHandler

Parameters

referenceID

The reference ID of the video to find.

bumperReferenceID

The reference ID of the bumper video.

authToken

The authorization token with which to validate the video’s license

parameters

Additional NSString query parameters to add to the Playback API requests. These values will override the default values if they conflict.

completionHandler

block which will be invoked when the request finishes. Execution of the completionHandler will occur on the main thread.

Discussion

Retrieves a BCOVVideo from the Playback API service by its reference ID on a background queue.

If the completionHandler provides an NSError, the BCOVVideo will be nil.

Declared In

BCOVPlaybackService.h

+ sourceFromJSONDictionary:

Initializes a source from the JSON dictionary. Properties that don’t map to first class properties on the source are added to the properties dictionary.

+ (BCOVSource *)sourceFromJSONDictionary:(NSDictionary *)json

Parameters

json

Dictionary representing the deserialized source.

Return Value

The initialized source.

Discussion

Initializes a source from the JSON dictionary. Properties that don’t map to first class properties on the source are added to the properties dictionary.

Declared In

BCOVPlaybackService.h

+ cuePointFromJSONDictionary:

Initializes a cue point from the JSON dictionary. Properties that don’t map to first class properties on cue point are added to the properties dictionary.

+ (BCOVCuePoint *)cuePointFromJSONDictionary:(NSDictionary *)json

Parameters

json

Dictionary representing the deserialized cuepoint.

Return Value

The initialized cue point.

Discussion

Initializes a cue point from the JSON dictionary. Properties that don’t map to first class properties on cue point are added to the properties dictionary.

Declared In

BCOVPlaybackService.h

+ playlistFromJSONDictionary:

Initializes a playlist from the JSON dictionary. Properties that don’t map to first class properties on playlist are added to the properties dictionary.

+ (BCOVPlaylist *)playlistFromJSONDictionary:(NSDictionary *)json

Parameters

json

Dictionary representing the deserialized playlist.

Return Value

The initialized playlist.

Discussion

Initializes a playlist from the JSON dictionary. Properties that don’t map to first class properties on playlist are added to the properties dictionary.

Declared In

BCOVPlaybackService.h

+ videoFromJSONDictionary:

Initializes a video from the JSON dictionary. Properties that don’t map to first class properties on video are added to the properties dictionary.

+ (BCOVVideo *)videoFromJSONDictionary:(NSDictionary *)json

Parameters

json

Dictionary representing the deserialized video.

Return Value

The initialized video.

Discussion

Initializes a video from the JSON dictionary. Properties that don’t map to first class properties on video are added to the properties dictionary.

Declared In

BCOVPlaybackService.h