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.hParameters
| Name | Type | Description |
|---|---|---|
| streamID | NSString * | Stream ID. |
| isEncrypt | BOOL | Whether 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.hParameters
| Name | Type | Description |
|---|---|---|
| instance | nonnull 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
