FLCastPlayer

public protocol FLCastPlayer : AdPlayer

Cast Player, an equivalent to GCKRemoteMediaClient.

  • The currently played asset

    Declaration

    Swift

    var castAsset: CastPlatformAsset? { get }
  • API to load media onto receiver

    Default Implementation

    API to load media onto receiver

    Declaration

    Swift

    func loadMedia(
        castAsset: CastAsset,
        metadata: GCKMediaMetadata,
        mediaTracks: [GCKMediaTrack]?,
        selectedTracks: [MediaTrack]?
    )

    Parameters

    castAsset

    The asset that must be loaded and played

    metadata

    The metadata

    mediaTracks

    The Media tracks

    selectedTracks

    Audio/subtitle track selections from the content player to apply once media is loaded on the receiver

  • API to load media onto receiver

    Default Implementation

    API to load media onto receiver

    Declaration

    Swift

    func loadMedia<T: Codable, U: Codable, V: Codable, W: Codable>(
        castAsset: CastAssetWithAnalytics<T, U, V, W>,
        metadata: GCKMediaMetadata,
        mediaTracks: [GCKMediaTrack]?,
        selectedTracks: [MediaTrack]?
    )

    Parameters

    castAsset

    The asset that must be loaded and played

    metadata

    The metadata

    mediaTracks

    The Media tracks

    selectedTracks

    Audio/subtitle track selections from the content player to apply once media is loaded on the receiver

  • API to get current item in the queue

    Declaration

    Swift

    func getCurrentItem() -> GCKMediaQueueItem?

    Return Value

    Current item in the queue if available else nil

  • API to jump to next item in the queue.

    Declaration

    Swift

    func jumpToNextItem()
  • setActiveTrackIDs(_:) Extension method

    Sets the active tracks. The request will fail if there is no current media status.

    Declaration

    Swift

    func setActiveTrackIDs(_ activeTrackIDs: [NSNumber]?) -> GCKRequest?

    Parameters

    activeTrackIDs

    An array of integers specifying the active tracks. May be empty or nil to disable any currently active tracks.

    Return Value

    The GCKRequest object for tracking this request. Nil if remote media client is not available.

  • setTextTrackStyle(_:) Extension method

    Sets the text track style. The request will fail if there is no current media status.

    Declaration

    Swift

    func setTextTrackStyle(_ textTrackStyle: GCKMediaTextTrackStyle?) -> GCKRequest?

    Parameters

    textTrackStyle

    The text track style. The style will not be changed if this is nil.

    Return Value

    The GCKRequest object for tracking this request. Nil if remote media client is not available.