registerWith static method
注册 Web 插件。 / Registers the web plugin.
Implementation
static void registerWith(Registrar registrar) {
final instance = FlutterCacheVideoPlayerWeb();
final methodChannel = MethodChannel(
'flutter_cache_video_player/player',
const StandardMethodCodec(),
registrar,
);
methodChannel.setMethodCallHandler(instance._handleMethodCall);
// ignore: deprecated_member_use
final eventChannel = PluginEventChannel<dynamic>(
'flutter_cache_video_player/player/events',
const StandardMethodCodec(),
registrar,
);
eventChannel.setController(instance._eventController);
}