registerWith static method
Implementation
static void registerWith(Registrar registrar) {
final MethodChannel channel = MethodChannel(
'hmssdk_flutter',
const StandardMethodCodec(),
registrar,
);
final pluginInstance = HmssdkFlutterWeb();
channel.setMethodCallHandler(pluginInstance.handleMethodCall);
_meetingEventChannel = mypec.PluginEventChannel(
'meeting_event_channel', const StandardMethodCodec(), registrar)
..setController(_meetingStreamController);
_previewEventChannel = mypec.PluginEventChannel(
'preview_event_channel', const StandardMethodCodec(), registrar)
..setController(_previewStreamController);
_logsEventChannel = mypec.PluginEventChannel(
"logs_event_channel", const StandardMethodCodec(), registrar)
..setController(_logsStreamController);
_rtcStatsChannel = mypec.PluginEventChannel(
"rtc_event_channel", const StandardMethodCodec(), registrar)
..setController(_rtcStreamController);
// ignore: undefined_prefixed_name
ui.platformViewRegistry.registerViewFactory('HMSVideoWebView',
(int viewId) {
if (videoViews[viewId] == null) {
videoViews[viewId] = html.VideoElement();
}
return videoViews[viewId]!;
});
importJsLibrary().then((value) {
hmssdkjsSetNotificationsHandler(allowInterop(notificationHandler));
});
}