registerWith static method

void registerWith(
  1. Registrar registrar
)

Implementation

static void registerWith(Registrar registrar) {
  final MethodChannel channel = MethodChannel(
    'livekit_client',
    const StandardMethodCodec(),
    registrar,
  );

  final pluginInstance = LiveKitWebPlugin();
  channel.setMethodCallHandler(pluginInstance.handleMethodCall);

  // Unofficial method load js as flutter assets (unreliable)
  // html.document.head!.append(html.ScriptElement()
  //   ..src = 'assets/packages/livekit_client/assets/ua-parser.min.js'
  //   ..type = 'application/javascript'
  //   ..defer = true
  //   );
}