Chromecast_Objc
@objc(THEOplayerChromecast)
public protocol Chromecast_Objc
Chromecast, also known as Google Cast, is a casting device designed by Google.
-
Whether THEOplayer is casting to a chromecast and has control over the current chromecast session.
Declaration
Swift
var casting: Bool { get } -
The last error thrown by chromecast.
Declaration
Swift
@objc(error) var error_Objc: CastError_Objc? { get } -
The name of the chromecast device that THEOplayer is casting to.
Remark
This value is nil if THEOplayer is not controlling the current chromecast session.Declaration
Swift
var receiverName: String? { get } -
Indicates the state of the casting process.
Declaration
Swift
@objc(state) var state_Objc: PlayerCastState { get } -
The ChromecastConnectionDelegate to be used when the Chromecast connection changes.
Declaration
Swift
func setConnectionDelegate(_ delegate: ChromecastConnectionDelegate?) -
Start casting to the chromecast. A dialog will prompt to choose the device.
Declaration
Swift
func start() -
Stop casting to the chromecast.
Declaration
Swift
func stop() -
Join an active chromecast session.
Declaration
Swift
func join() -
Leave an active chromecast session without affecting other devices.
Declaration
Swift
func leave() -
Adds the given event listener of the given
ChromecastEventType.Remark
When attaching a listener on the wrong object the application will crash.
Declaration
Swift
@discardableResult func addEventListener(type: String, listener: @escaping (ChromeCastEvent) -> ()) -> EventListenerParameters
typeChromecastEventType of the added event listener.
listenerClosure called when event is dispatched.
Return Value
EventListener that can be removed.
-
Removes the given event listener of the given
ChromecastEventType.Declaration
Swift
func removeEventListener(type: String, listener: EventListener)Parameters
typeChromecastEventType of the removed event listener.
listenerEventListener object that has been return on addEventListener.
Chromecast_Objc Protocol Reference