【问题标题】:Agora.io Channel Encryption for flutter not working for cross platform用于颤振的 Agora.io 通道加密不适用于跨平台
【发布时间】:2020-01-15 04:48:10
【问题描述】:

我在使用 Agora Flutter SDK 进行视频/语音通话时尝试使用通道加密。但是,当使用加密功能时,视频/语音通话将无法跨平台(例如:android通话iOS)。但是,如果 android 调用 android,或者 iOS 调用 iOS,则可以工作。下面是我在颤振(outgoingCall.dart)中的实现。谢谢。

Future<void> initialize() async {
 if (APP_ID.isEmpty) {
 setState(() {
 _infoStrings.add('APP_ID missing, please provide your APP_ID in settings.dart',);
_infoStrings.add('Agora Engine is not starting');
  });
 return;
 }

 await _initAgoraRtcEngine();
 _addAgoraEventHandlers();
 AgoraRtcEngine.setAudioProfile(AudioProfile.Default, AudioScenario.Default);
 await encrypt(myChannel); //this is where i call encrypt function
 await AgoraRtcEngine.joinChannel(null, myChannel, null, 0);
}


Future<void> encrypt(String myChannel) async {
await AgoraRtcEngine.setEncryptionSecret(myChannel);
await AgoraRtcEngine.setEncryptionMode("aes-256-xts");

print('caller encrypted: ' + myChannel + ' in aes-256-xts');
}

【问题讨论】:

  • 你找到解决办法了吗?

标签: flutter dart agora.io


【解决方案1】:

您的代码似乎对于加密您的频道 ID 是正确的。

但要通过跨平台加密,您需要确保将 libagora-crypto.so 和 libcrypto.a 文件分别添加到 Android 和 iOS 文件夹中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-08-07
    • 1970-01-01
    • 1970-01-01
    • 2022-01-23
    • 2021-10-06
    • 2021-12-19
    • 1970-01-01
    • 2016-01-17
    相关资源
    最近更新 更多