BMPBitmovinCastManager

Objective-C


@interface BMPBitmovinCastManager : NSObject

Swift

class BitmovinCastManager : NSObject

IMPORTANT: Methods from BMPBitmovinCastManager need to be called from the main thread.

Singleton providing access to GoogleCast related features. The BMPBitmovinCastManager needs to be initialized by calling BMPBitmovinCastManager#initializeCasting in the AppDelegate of the application which should support casting.

  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isConnected) BOOL connected

    Swift

    var isConnected: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isConnecting) BOOL connecting

    Swift

    var isConnecting: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isCastAvailable) BOOL castAvailable

    Swift

    var isCastAvailable: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) GCKMediaStatus *currentMediaStatus

    Swift

    var currentMediaStatus: GCKMediaStatus? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) GCKMediaMetadata *currentMediaMetadata

    Swift

    var currentMediaMetadata: GCKMediaMetadata? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) GCKDevice *currentDevice

    Swift

    var currentDevice: GCKDevice? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isPlaying) BOOL playing

    Swift

    var isPlaying: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isPaused) BOOL paused

    Swift

    var isPaused: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isMuted) BOOL muted

    Swift

    var isMuted: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isStalled) BOOL stalled

    Swift

    var isStalled: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval currentTime

    Swift

    var currentTime: TimeInterval { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval duration

    Swift

    var duration: TimeInterval { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable, strong) GCKCastChannel *defaultChannel

    Swift

    var defaultChannel: GCKCastChannel? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) BMPGoogleCastReceiverVersion castReceiverVersion

    Swift

    var castReceiverVersion: GoogleCastReceiverVersion { get }
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    + (instancetype)new NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    + (instancetype)sharedInstance;

    Swift

    class func sharedInstance() -> Self
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)isInitialized;

    Swift

    class func isInitialized() -> Bool
  • Uses Bitmovin v2 receiver by default

    Declaration

    Objective-C

    + (void)initializeCasting;

    Swift

    class func initializeCasting()
  • Deprecated

    Use BMPBitmovinCastManager#initializeCasting(options:) instead.

    Uses Bitmovin v2 or v3 receiver based on castReceiverVersion

    Declaration

    Objective-C

    + (void)initializeCasting:
        (nonnull BMPGoogleCastReceiverVersion)castReceiverVersion;

    Swift

    class func initializeCasting(castReceiverVersion: GoogleCastReceiverVersion)

    Parameters

    castReceiverVersion

    version of receiver

  • Deprecated

    Use BMPBitmovinCastManager#initializeCasting(options:) instead.

    Uses given receiver app and assumes it is v2

    Declaration

    Objective-C

    + (void)initializeCasting:(nonnull NSString *)applicationId
             messageNamespace:(nullable NSString *)messageNamespace;

    Swift

    class func initializeCasting(applicationId: String, messageNamespace: String?)

    Parameters

    applicationId

    ID of receiver application

    messageNamespace

    Custom namespace

  • Deprecated

    Use BMPBitmovinCastManager#initializeCasting(options:) instead.

    Uses given receiver app with given receiver version

    Declaration

    Objective-C

    + (void)initializeCasting:(nonnull NSString *)applicationId
          castReceiverVersion:
              (nonnull BMPGoogleCastReceiverVersion)castReceiverVersion;

    Swift

    class func initializeCasting(applicationId: String, castReceiverVersion: GoogleCastReceiverVersion)

    Parameters

    applicationId

    ID of receiver application

    castReceiverVersion

    version of receiver

  • Deprecated

    Use BMPBitmovinCastManager#initializeCasting(options:) instead.

    Uses given receiver app with given receiver version and namespace

    Declaration

    Objective-C

    + (void)initializeCasting:(nonnull NSString *)applicationId
          castReceiverVersion:
              (nonnull BMPGoogleCastReceiverVersion)castReceiverVersion
             messageNamespace:(nullable NSString *)messageNamespace;

    Swift

    class func initializeCasting(applicationId: String, castReceiverVersion: GoogleCastReceiverVersion, messageNamespace: String?)

    Parameters

    applicationId

    ID of receiver application

    castReceiverVersion

    version of receiver

    messageNamespace

    Custom namespace

  • Initialize BitmovinCastManager based on the provided BitmovinCastManagerOptions.

    Declaration

    Objective-C

    + (void)initializeCastingWithOptions:
        (nonnull BMPBitmovinCastManagerOptions *)options;

    Swift

    class func initializeCasting(options: BMPBitmovinCastManagerOptions)

    Parameters

    options

    BMPBitmovinCastManagerOptions to use for initializing BMPBitmovinCastManager

  • Undocumented

    Declaration

    Objective-C

    - (void)prepareWithMediaInformation:(GCKMediaInformation *)mediaInformation NS_SWIFT_NAME(prepare(mediaInformation:));

    Swift

    func prepare(mediaInformation: GCKMediaInformation)
  • Undocumented

    Declaration

    Objective-C

    - (void)loadMedia;

    Swift

    func loadMedia()
  • Undocumented

    Declaration

    Objective-C

    - (void)loadMedia:(BOOL)autoplay NS_SWIFT_NAME(loadMedia(autoplay:));

    Swift

    func loadMedia(autoplay: Bool)
  • Undocumented

    Declaration

    Objective-C

    - (void)loadMedia:(BOOL)autoplay position:(NSTimeInterval)position NS_SWIFT_NAME(loadMedia(autoplay:position:));

    Swift

    func loadMedia(autoplay: Bool, position: TimeInterval)
  • Undocumented

    Declaration

    Objective-C

    - (void)unload;

    Swift

    func unload()
  • Undocumented

    Declaration

    Objective-C

    - (void)showDialog;

    Swift

    func showDialog()
  • Undocumented

    Declaration

    Objective-C

    - (void)addListener:(id<BMPBitmovinCastManagerListener>)listener NS_SWIFT_NAME(add(listener:));

    Swift

    func add(listener: BitmovinCastManagerListener)
  • Undocumented

    Declaration

    Objective-C

    - (void)removeListener:(id<BMPBitmovinCastManagerListener>)listener NS_SWIFT_NAME(remove(listener:));

    Swift

    func remove(listener: BitmovinCastManagerListener)
  • Undocumented

    Declaration

    Objective-C

    - (void)play;

    Swift

    func play()
  • Undocumented

    Declaration

    Objective-C

    - (void)pause;

    Swift

    func pause()
  • Undocumented

    Declaration

    Objective-C

    - (void)seek:(NSTimeInterval)time NS_SWIFT_NAME(seek(time:));

    Swift

    func seek(time: TimeInterval)
  • Sends the given message to the cast receiver. The receiver can pick up the message on the namespace returned by defaultChannel.protocolNamespace.

    Declaration

    Objective-C

    - (BOOL)sendMessage:(nonnull NSString *)message;

    Swift

    func sendMessage(_ message: String) -> Bool

    Parameters

    message

    The message to send.

    Return Value

    true if the message could be sent successfully.

  • Sends the given message to the cast receiver on the provided namespace. If no namespace is provided, the one returned by defaultChannel.protocolNamespace is used.

    Declaration

    Objective-C

    - (BOOL)sendMessage:(nonnull NSString *)message
          withNamespace:(nullable NSString *)messageNamespace;

    Swift

    func sendMessage(_ message: String, withNamespace messageNamespace: String?) -> Bool

    Parameters

    message

    The message to send.

    messageNamespace

    The namespace the message should be send on.

    Return Value

    true if the message could be sent successfully.

  • Sends the given metadata wrapped in a metadata message object to the cast receiver on the configured message namespace. The provided metadata must be serializable using NSJSONSerialization.

    Declaration

    Objective-C

    - (BOOL)sendMetadata:(nonnull NSDictionary *)metadata;

    Swift

    func send(metadata: [AnyHashable : Any]) -> Bool

    Parameters

    metadata

    The metadata to send. Must be serializable using NSJSONSerialization.

    Return Value

    true if the message could be sent successfully.