addPublishCdnUrl method

Future<Map> addPublishCdnUrl(
  1. String streamID,
  2. String targetURL,
  3. {int? timeout}
)

Implementation

Future<Map<dynamic, dynamic>> addPublishCdnUrl(
    String streamID, String targetURL,
    {int? timeout}) async {
  final map = {};
  try {
    final promise = callMethod(ZegoFlutterEngine.instance, 'addPublishCdnUrl',
        [streamID, targetURL]);
    final result = await promiseToFuture(promise);
    map["errorCode"] = getProperty(result, 'errorCode');
  } catch (error) {
    map["errorCode"] = getProperty(error, 'errorCode');
  }
  return Future.value(map);
}