destroy static method

Future<bool> destroy()

Method to destroy PIP View.

This method can be call at time of changing role to hls-viewer role.

Refer PIP mode guide here

Implementation

static Future<bool> destroy() async {
  if (_isPIPSetupDone) {
    final bool? result =
        await PlatformService.invokeMethod(PlatformMethod.destroyPIP);
    if (result ?? false) {
      _isPIPSetupDone = false;
    }
    return result ?? false;
  }
  return true;
}