THEOlive
public protocol THEOlive : EventDispatcherProtocol, THEOliveAPI
API to access THEOlive specific functionality.
-
Adds the given event listener of the given THEOliveEventTypes.
Remark
When attaching a listener on the wrong object the application will crash.
Declaration
Swift
func addEventListener<E>(type: EventType<E>, listener: @escaping (E) -> ()) -> THEOplayerSDK.EventListener where E : EventProtocolParameters
typeTHEOliveEventTypes 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 THEOliveEventTypes.
Declaration
Swift
func removeEventListener<E>(type: EventType<E>, listener: THEOplayerSDK.EventListener) where E : EventProtocolParameters
typeTHEOliveEventTypes of the removed event listener.
listenerEventListener object that has been return on addEventListener.