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) BOOL isConnected

    Swift

    var isConnected: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isConnecting

    Swift

    var isConnecting: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isCastAvailable

    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) BOOL isPlaying

    Swift

    var isPlaying: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isPaused

    Swift

    var isPaused: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isMuted

    Swift

    var isMuted: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isStalled

    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 }
  • 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 default Bitmovin receiver app

    Declaration

    Objective-C

    + (void)initializeCasting;

    Swift

    class func initializeCasting()
  • Deprecated

    Use BMPBitmovinCastManager#initializeCasting(options:) instead.

    Uses given receiver app

    Declaration

    Objective-C

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

    Swift

    class func initializeCasting(applicationId: String)

    Parameters

    applicationId

    ID of receiver application

  • Deprecated

    Use BMPBitmovinCastManager#initializeCasting(options:) instead.

    Uses given receiver app

    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

  • 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)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)
  • Undocumented

    Declaration

    Objective-C

    - (void)_seek:(NSTimeInterval)time completionHandler:(nullable void(^)(void))completionHandler NS_SWIFT_NAME(_seek(time:completionHandler:));

    Swift

    func _seek(time: TimeInterval) async
  • Undocumented

    Declaration

    Objective-C

    - (void)seekToItemWithItemId:(NSUInteger)itemId
                         andTime:(NSTimeInterval)time NS_SWIFT_NAME(seekToItem(itemId:time:));

    Swift

    func seekToItem(itemId: UInt, time: TimeInterval)
  • Undocumented

    Declaration

    Objective-C

    - (void)_seekToItemWithItemId:(NSUInteger)itemId
                          andTime:(NSTimeInterval)time
                completionHandler:(nullable void(^)(void))completionHandler NS_SWIFT_NAME(_seekToItem(itemId:time:completionHandler:));

    Swift

    func _seekToItem(itemId: UInt, time: TimeInterval) async
  • Undocumented

    Declaration

    Objective-C

    - (NSUInteger)getItemIdAtIndex:(NSUInteger)index NS_SWIFT_NAME(getItemId(index:));

    Swift

    func getItemId(index: UInt) -> UInt
  • 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.