setPlayStreamDecryptionKey method

Future<void> setPlayStreamDecryptionKey(
  1. String streamID,
  2. String key
)

Set decryption key for the playing stream.

Available since: 1.19.0 Description: When streaming, the audio and video data will be decrypted according to the set key. Use cases: Usually used in scenarios that require high security for audio and video calls. When to call: after createEngine, after the play stream can be changed at any time. Restrictions: This function is only valid when calling from Zego RTC or L3 server. Related APIs: setPublishStreamEncryptionKeySet the publish stream encryption key. Caution: This interface can only be called if encryption is set on the publish. Calling stopPlayingStream or logoutRoom will clear the decryption key.

  • streamID Stream ID.
  • key The decryption key, note that the key length only supports 16/24/32 bytes.

Implementation

Future<void> setPlayStreamDecryptionKey(String streamID, String key) async {
  return await ZegoExpressImpl.instance
      .setPlayStreamDecryptionKey(streamID, key);
}