SourceConfig
@objcMembers
@objc(BMPSourceConfig)
open class SourceConfig : NSObject
Represents a source config which can be played back in a player instance.
-
The url for this source config.
Declaration
Swift
public let url: URL -
The
SourceTypefor this configDeclaration
Swift
public let type: SourceType -
The title of the video source.
Declaration
Swift
public var title: String? -
The description of the video source.
Declaration
Swift
public var sourceDescription: String? -
The URL to a preview image displayed until the video starts.
Declaration
Swift
public var posterSource: URL? -
Indicates whether to show the poster image during playback. Useful, for example, for audio-only streams. Default is false.
Declaration
Swift
public var isPosterPersistent: Bool -
Config for audio and subtitle track labels.
Declaration
Swift
public var labelingConfig: LabelingConfig -
The DRM config for the source.
Declaration
Swift
public var drmConfig: DrmConfig? -
An array of track data, such as subtitle tracks.
Declaration
Swift
public private(set) var tracks: [Track] { get } -
The thumbnail track for this source config.
Declaration
Swift
public var thumbnailTrack: ThumbnailTrack? -
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
AVMetadataItemare passed as values to the metadata dictionary, they are set asexternalMetadataon theAVPlayerItemon tvOS.When
SourceConfigis used for GoogleCast with V3 receiver, all values must be an instance of NSString.See
MetadataIdentifierfor more supported attributes.Declaration
Swift
@nonobjc public var metadata: [String : Any] -
An object specifying advanced source specific options.
Declaration
Swift
public var options: SourceOptions -
Creates a new
SourceConfigbased on the given source URL.Declaration
Swift
public convenience 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
SourceConfigbased on the given source URL for the provideSourceType.Passing
SourceType.noneto this initializer is not supported.Declaration
Swift
public convenience init( url: URL, type: SourceType )Parameters
urlThe URL for the media source.
typeThe
SourceTypefor 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.
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
Swift
@objc(addSubtitleTrack:) public func add(subtitleTrack: SubtitleTrack)Parameters
subtitleTrackThe subtitle track to add.
-
A list of
TimelineMarker. Currently, the only type of supported marker isInterstitialMarker. See the documentation ofInterstitialMarkerfor more information.When a
TimelineMarkeris entered during playback, aTimelineMarkerEnterEventis emitted. When aTimelineMarkeris exited during playback, aTimelineMarkerExitEventis emitted.Declaration
Swift
@available(tvOS 14.0, *) @available(iOS, unavailable) public var markers: [TimelineMarker] { get set } -
Declaration
Swift
@objc(metadata) var _metadata: NSMutableDictionary { get set }
SourceConfig Class Reference