setExternalVideoSource abstract method
Future<void>
setExternalVideoSource({
- required bool enabled,
- required bool useTexture,
- ExternalVideoSourceType sourceType = ExternalVideoSourceType.videoFrame,
- SenderOptions encodedVideoOption = const SenderOptions(),
Configures the external video source.
After calling this method to enable an external video source, you can call pushVideoFrame to push external video data to the SDK.
enabledWhether to use the external video source: true : Use the external video source. The SDK prepares to accept the external video frame. false : (Default) Do not use the external video source.useTextureWhether to use the external video frame in the Texture format. true : Use the external video frame in the Texture format. false : (Default) Do not use the external video frame in the Texture format.sourceTypeWhether the external video frame is encoded. See ExternalVideoSourceType.encodedVideoOptionVideo encoding options. This parameter needs to be set if sourceType is encodedVideoFrame. To set this parameter, contact.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.
Implementation
Future<void> setExternalVideoSource(
{required bool enabled,
required bool useTexture,
ExternalVideoSourceType sourceType = ExternalVideoSourceType.videoFrame,
SenderOptions encodedVideoOption = const SenderOptions()});