registerPlayerObserver method
Implementation
void registerPlayerObserver(RtcMediaPlayerEventHandler handler) {
_handler = handler;
_subscription ??= _eventChannel.receiveBroadcastStream().listen((event) {
final eventMap = Map<dynamic, dynamic>.from(event);
final methodName = eventMap['methodName'] as String;
final data = List<dynamic>.from(eventMap['data']);
_handler?.process(methodName, data);
});
}