openRemoteDeviceByAdmin method

TUIRequest openRemoteDeviceByAdmin(
  1. String userId,
  2. TUIMediaDevice device,
  3. int timeout,
  4. TUIRequestCallback? requestCallback,
)

Implementation

TUIRequest openRemoteDeviceByAdmin(String userId, TUIMediaDevice device,
    int timeout, TUIRequestCallback? requestCallback) {
  String userData = Tools.generateUserData();
  if (requestCallback != null) {
    _requestCallbackMap.addAll({userData: requestCallback});
  }
  var nativeRequest = _engineSDK.Dart_OpenRemoteDeviceByAdmin(
      _engineFFIPointer,
      Tools.string2PointerChar(userId),
      device.value(),
      timeout,
      Tools.string2PointerChar(userData));
  Map<String, dynamic> map =
      json.decode(Tools.pointerChar2String(nativeRequest));
  calloc.free(nativeRequest);
  return TUIRequest.fromJson(map);
}