SourceConfig

@objcMembers
@objc(BMPSourceConfig)
open class SourceConfig : NSObject

Represents a source config which can be played back in a player instance.

  • url

    The url for this source config.

    Declaration

    Swift

    public let url: URL
  • The SourceType for this config

    Declaration

    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 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 MetadataIdentifier for 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 SourceConfig based on the given source URL.

    Declaration

    Swift

    public convenience init?(url: URL)

    Parameters

    url

    The URL for the media source.

    Return Value

    A new source config initialized with the given URL, or nil on failure.

  • Creates a new SourceConfig based on the given source URL for the provide SourceType.

    Passing SourceType.none to this initializer is not supported.

    Declaration

    Swift

    public convenience init(
        url: URL,
        type: SourceType
    )

    Parameters

    url

    The URL for the media source.

    type

    The 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.

    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

    subtitleTrack

    The subtitle track to add.

  • A list of TimelineMarker. Currently, the only type of supported marker is InterstitialMarker. See the documentation of InterstitialMarker for more information.

    When a TimelineMarker is entered during playback, a TimelineMarkerEnterEvent is emitted. When a TimelineMarker is exited during playback, a TimelineMarkerExitEvent is 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 }