BCOVSource Protocol Reference

Conforms to NSObject
Declared in BCOVSource.h

Overview

A specific “source” or rendition within a BCOVVideo object. While Brightcove organizes content into entities called videos, the actual media URLs at which the content can be accessed is encapsulated by a source. In addition to the URL, a source may have an optional delivery type which can be used to help disambiguate it from other sources, and a set of properties distinct from the properties on the video which owns it.

Note that it is valid for a video to contain multiple sources with the same delivery type, in which case the sources must be disambiguated by some other means (such as with different values in their respective properties).

  url required method

The URL at which this source instance’s media is accessible.

@property (nonatomic, readonly, copy) NSURL *url

Discussion

The URL at which this source instance’s media is accessible.

Declared In

BCOVSource.h

  deliveryMethod required method

The delivery method describing this source in relation to other sources in the same video.

@property (nonatomic, readonly, copy) NSString *deliveryMethod

Discussion

The delivery method describing this source in relation to other sources in the same video.

Declared In

BCOVSource.h

  properties required method

The metadata or properties related to this source instance.

@property (nonatomic, readonly, copy) NSDictionary *properties

Discussion

The metadata or properties related to this source instance.

Declared In

BCOVSource.h

– update: required method

Returns a modified version of this source. Because BCOVSource objects are immutable, an entirely new BCOVSource must be created even if only a single change is needed. Therefore, this method provides a convenient way to obtain a temporary mutable copy of this instance and modify it (within updateBlock).

- (instancetype)update:(void ( ^ ) ( id<BCOVMutableSource> mutableSource ))updateBlock

Parameters

updateBlock

A block which is passed a mutable copy of this source.

Return Value

The copy of this source modified by updateBlock.

Discussion

Returns a modified version of this source. Because BCOVSource objects are immutable, an entirely new BCOVSource must be created even if only a single change is needed. Therefore, this method provides a convenient way to obtain a temporary mutable copy of this instance and modify it (within updateBlock).

Do not attempt to save a reference to the mutable source passed to updateBlock, as the behavior of doing this is undefined. Instead, make whatever modifications are necessary in the block and then capture the source object returned from this method.

Declared In

BCOVSource.h