On this page

IZegoCustomMediaCryptoFactory

2026-05-06

IZegoCustomMediaCryptoFactory

Declared in callback/IZegoCustomMediaCryptoFactory.java

Methods

createMediaCrypto

createMediaCrypto
public IZegoCustomMediaCrypto createMediaCrypto(String streamID, boolean isEncrypt)
Create a custom media crypto object.
Declared in callback/IZegoCustomMediaCryptoFactory.java

Parameters

NameTypeDescription
streamIDStringStream ID.
isEncryptbooleanWhether 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
public void destroyMediaCrypto(IZegoCustomMediaCrypto instance)
Destroy a custom media crypto object.
Declared in callback/IZegoCustomMediaCryptoFactory.java

Parameters

NameTypeDescription
instanceIZegoCustomMediaCryptoThe 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

izegocustommediacrypto

Next

izegocustomvideocapturehandler

On this page

Back to top