On this page

ZegoCustomMediaCryptoFactory

ZegoCustomMediaCryptoFactory

Declared in ZegoExpressEventHandler.h

Methods

createMediaCrypto:isEncrypt:

createMediaCrypto:isEncrypt:
- (nonnull id<ZegoCustomMediaCrypto>)createMediaCrypto:(NSString *) streamID isEncrypt:(BOOL) isEncrypt;
Create a custom media crypto object.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
streamIDNSString *Stream ID.
isEncryptBOOLWhether to encrypt. true indicates encryption, false indicates decryption.

Details

The SDK notifies that media data encryption/decryption needs to begin. When to

  • Trigger: After calling [startPlayingStream] or [startPublishingStream] successfully.
  • Available since: 3.24.0

Return

Custom media crypto object.

destroyMediaCrypto:

destroyMediaCrypto:
- (void)destroyMediaCrypto:(nonnull id<ZegoCustomMediaCrypto>) instance;
Destroy a custom media crypto object.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
instancenonnull id<ZegoCustomMediaCrypto>The custom media crypto object returned by the callback [createMediaCrypto].

Details

Destroy a custom media crypto object. When to

  • Trigger: At the end of a stream.
  • Available since: 3.24.0

Previous

zegocustommediacrypto

Next

zegocustomplayerresourceconfig

On this page

Back to top