VodEventDispatcher class
Event dispatcher.
The native side emits unified events such as onPlayerEvent / onPlayerNetEvent
on a single channel. This dispatcher routes them by playerId to the right
TXVodPlayerController, download events to TXVodDownloadController, and
global events to SuperPlayerPlugin.
Usage:
- Controllers call registerPlayer on construction and unregisterPlayer
on
dispose. - Download / global listeners register via registerDownloadListener / registerPluginListener.
Note:
Dart's MethodChannel.setMethodCallHandler is a single-slot setter, so all
handlers must be centralised here to avoid multiple controllers overwriting
each other.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerDownloadListener(
void handler(Map< String, Object> event, bool isPreDownload)) → void - Register the process-wide download event listener.
-
registerPipListener(
void handler(Map event)) → void - Register the process-wide picture-in-picture event listener.
-
registerPlayer(
int playerId, void handler(Map event, bool isNetEvent)) → void - Register event callback for a player instance.
-
registerPluginListener(
void handler(String method, Map event)) → void - Register the process-wide plugin-level event listener.
-
toString(
) → String -
A string representation of this object.
inherited
-
unregisterPlayer(
int playerId) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → VodEventDispatcher
-
final