PlayerEventsApi
@objc(BMPPlayerEventsApi)
public class PlayerEventsApi : NSObject
The Obj-C version of the player events API. It is empty on purpose as Combine-based event subscriptions can only be used from Swift.
-
Returns a publisher for the specified
PlayerEventtype that occurs on thePlayer. It publishes all events for this player with the specified type. This publisher can never fail.To receive all events from the
Player, subscribe to bothplayer.events.on(PlayerEvent.self)andplayer.events.on(SourceEvent.self)Declaration
Swift
func on<T>(_ eventType: T.Type) -> AnyPublisher<T, Never> where T : PlayerEventParameters
eventTypetype of the event
Return Value
publisher for the given
PlayerEventtype. -
Returns a publisher for the specified
SourceEventtype that occurs on the currentSourceof thePlayer. It publishes all events for this source with the specified type. This publisher can never fail.To receive all events from the
Player, subscribe to bothplayer.events.on(PlayerEvent.self)andplayer.events.on(SourceEvent.self)Declaration
Swift
func on<T>(_ eventType: T.Type) -> AnyPublisher<T, Never> where T : SourceEventParameters
eventTypetype of the event
Return Value
publisher for the given
SourceEventtype on the currentSource.
PlayerEventsApi Class Reference