preview method

Future<void> preview({
  1. required HMSConfig config,
})

Begin a preview so that the local peer's audio and video can be displayed to them before they join a call. The details of the call they want to join are passed using HMSConfig. This may affect whether they are allowed to publish audio or video at all.

Refer Preview guide here.

Implementation

Future<void> preview({
  required HMSConfig config,
}) async {
  previewState = true;
  await PlatformService.invokeMethod(PlatformMethod.preview, arguments: {
    ...config.getJson(),
  });
  previewState = false;
  return null;
}