BMPSourceConfig
Objective-C
@interface BMPSourceConfig : NSObject
Swift
class SourceConfig : NSObject
Represents a source config which can be played back in a player instance.
-
The url for this source config
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSURL *_Nonnull url;Swift
var url: URL { get } -
The SourceType for this config
Declaration
Objective-C
@property (nonatomic, readonly) BMPSourceType type;Swift
var type: SourceType { get } -
The title of the video source.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *title;Swift
var title: String? { get set } -
The description of the video source.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *sourceDescription;Swift
var sourceDescription: String? { get set } -
The URL to a preview image displayed until the video starts.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSURL *posterSource;Swift
var posterSource: URL? { get set } -
Indicates whether to show the poster image during playback. Useful, for example, for audio-only streams.
Declaration
Objective-C
@property (nonatomic) BOOL isPosterPersistent;Swift
var isPosterPersistent: Bool { get set } -
Config for audio and subtitle track labels.
Declaration
Objective-C
@property (nonatomic, strong, nonnull) BMPLabelingConfig *labelingConfig;Swift
var labelingConfig: LabelingConfig { get set } -
The DRM config for the source.
Declaration
Objective-C
@property (nonatomic, strong, nullable) BMPDRMConfig *drmConfig;Swift
var drmConfig: DRMConfig? { get set } -
An array of timed data, such as thumbnail- or subtitle tracks.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nonnull) NSArray<BMPTrack *> *tracks;Swift
var tracks: [Track] { get } -
The thumbnail track for this source config
Declaration
Objective-C
@property (nonatomic, strong, nullable) BMPThumbnailTrack *thumbnailTrack;Swift
var thumbnailTrack: ThumbnailTrack? { get set } -
Holds metadata for this source config. This data can be used by the player UI to display additional information about the currently played source.
When objects of type AVMetadataItem are passed as values to the metadata dictionary, they are set as externalMetadata on the AVPlayerItem on tvOS.
When SourceConfig is used for GoogleCast with V3 receiver, all values must be an instance of NSString.
See
BMPMetadataIdentifierfor more supported attributes.Declaration
Objective-C
@property (nonatomic, copy) NSMutableDictionary<NSString *, id<NSObject, NSCopying>> *_Nonnull metadata;Swift
@NSCopying var metadata: NSMutableDictionary { get set } -
An object specifying advanced source specific options.
Declaration
Objective-C
@property (nonatomic, strong) BMPSourceOptions *_Nonnull options;Swift
var options: SourceOptions { get set } -
Creates a new BMPSourceConfig based on the given source URL.
Declaration
Objective-C
- (nullable instancetype)initWithUrl:(nonnull NSURL *)url;Swift
init?(url: URL)Parameters
urlThe URL for the media source.
Return Value
A new source config initialized with the given URL, or nil on failure.
-
Creates a new BMPSourceConfig based on the given source URL for the provide BMPSourceType.
Note
Passing SourceType.none to this initializer is not supported.
Declaration
Objective-C
- (nonnull instancetype)initWithUrl:(nonnull NSURL *)url type:(BMPSourceType)type;Swift
init(url: URL, type: SourceType)Parameters
urlThe URL for the media source.
typeThe SourceType for the media source.
Return Value
A new source config initialized with the given URL.
-
Can be used to add external subtitles to this source config.
Note
Subtitles which are added using this method are only supported in combination with our Bitmovin UI or for source configs which are loaded into a Chromecast session.
Declaration
Objective-C
- (void)addSubtitleTrack:(nonnull BMPSubtitleTrack *)subtitleTrack;Swift
func add(subtitleTrack: SubtitleTrack)Parameters
subtitleTrackThe subtitle track to add.
-
Deprecated
Use sourceConfig#url and sourceConfig#type instead.
The HLS source for this source config. HLS content can easily and for free be generated using Bitmovin’s video encoding solution.
Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) BMPHLSSource *hlsSource;Swift
var hlsSource: HLSSource? { get } -
Deprecated
Use sourceConfig#url and sourceConfig#type instead.
The DASH source for this source config which can ONLY be used for remote playback (e.g. Chromecast). DASH content can easily and for free be generated using Bitmovin’s video encoding solution.
Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) BMPDASHSource *dashSource;Swift
var dashSource: DASHSource? { get } -
Deprecated
Use sourceConfig#url and sourceConfig#type instead.
An array of progressive multimedia sources which are used as fallback when no HLS source is set.
Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) BMPProgressiveSource *progressiveSource;Swift
var progressiveSource: ProgressiveSource? { get } -
Deprecated
Use SourceConfig#init(url:type:) instead.
Creates a new BMPSourceConfig based on the given adaptive source.
Declaration
Objective-C
- (nullable instancetype)initWithAdaptiveSource: (nonnull BMPAdaptiveSource *)adaptiveSource;Swift
init?(adaptiveSource: AdaptiveSource)Parameters
adaptiveSourceThe adaptive source for the source config.
Return Value
A new source config initialized with the given adaptive source, or nil on failure.
-
Deprecated
Use SourceConfig#init(url:type:) instead.
Creates a new BMPSourceConfig based on the given HLS source.
Declaration
Objective-C
- (nonnull instancetype)initWithHLSSource:(nonnull BMPHLSSource *)hlsSource;Swift
init(hlsSource: HLSSource)Parameters
hlsSourceThe HLS source for this source config.
Return Value
A new source config initialized with the given HLS source.
-
Deprecated
Use SourceConfig#init(url:type:) instead.
Creates a new BMPSourceConfig based on the given DASH source.
Declaration
Objective-C
- (nonnull instancetype)initWithDASHSource:(nonnull BMPDASHSource *)dashSource;Swift
init(dashSource: DASHSource)Parameters
dashSourceThe DASH source for this source config.
Return Value
A new source config initialized with the given DASH source.
-
Deprecated
Use SourceConfig#init(url:type:) instead.
Creates a new BMPSourceConfig based on the given progressive source.
Declaration
Objective-C
- (nonnull instancetype)initWithProgressiveSource: (nonnull BMPProgressiveSource *)progressiveSource;Swift
init(progressiveSource: ProgressiveSource)Parameters
progressiveSourceThe progressive source for this source config.
Return Value
A new source config initialized with the given progressive source.
-
Deprecated
Use sourceConfig#url and sourceConfig#type instead.
Returns the stream URL for the given source type. Possible parameter values are defined in BMPSourceType.h.
Declaration
Objective-C
- (nullable NSURL *)urlForType:(BMPSourceType)type;Swift
func url(forType type: SourceType) -> URL?Parameters
typeThe source type to get the URL for.
Return Value
The URL for the given source type or nil if an invalid type was passed.
-
Deprecated
Use sourceConfig#url and sourceConfig#type instead.
Indicates whether this source config contains a source for the given source type. Possible parameter values are defined in BMPSourceType.h.
Declaration
Objective-C
- (BOOL)hasSourceOfType:(BMPSourceType)type;Swift
func hasSource(ofType type: SourceType) -> BoolParameters
typeThe source type to check.
Return Value
YES if a source for the given type is set, NO otherwise.
-
Deprecated
Use Player#playlist for playback of multiple sources instead.
Tries to a add a new media source for the given URL.
Note
If an invalid URL was passed or media source for the URL cannot be identified, this method will fail.
Declaration
Objective-C
- (BOOL)addSource:(nonnull NSURL *)url error:(NSError *_Nullable *_Nullable)error;Swift
func add(sourceUrl url: URL) throwsParameters
urlThe URL of the media source to add.
errorA pointer to an error object for receiving information about any problems that occurred when adding the source.
Return Value
YES if the media source was added correctly, NO otherwise.
-
Deprecated
Use Player#playlist for playback of multiple sources instead.
Tries to add a given adaptive source to this source config.
Note
If an adaptive source gets added and a source for the according type is already set, this method will fail. For example, adding a HLS source altough already set.
Declaration
Objective-C
- (BOOL)addAdaptiveSource:(nonnull BMPAdaptiveSource *)adaptiveSource error:(NSError *_Nullable *_Nullable)error;Swift
func add(adaptiveSource: AdaptiveSource) throwsParameters
adaptiveSourceThe adaptive source to add.
errorA pointer to an error object for receiving information about any problems that occurred when adding the source.
Return Value
YES if the adaptive source was added correctly, NO otherwise.
-
Deprecated
Use Player#playlist for playback of multiple sources instead.
Tries to add a given progressive source to this source config.
Note
If an progressive source gets added and there are already progressive sources set, this method will fail. If you want to add multiple progressive source at a time, use #addProgressiveSources:error.
Declaration
Objective-C
- (BOOL)addProgressiveSource:(nonnull BMPProgressiveSource *)progressiveSource error:(NSError *_Nullable *_Nullable)error;Swift
func add(progressiveSource: ProgressiveSource) throwsParameters
progressiveSourceThe progressive source to add.
errorA pointer to an error object for receiving information about any problems that occurred when adding the source.
Return Value
YES if the progressive source was added correctly, NO otherwise.
BMPSourceConfig Class Reference