setExternalVideoSource abstract method

Future<void> setExternalVideoSource({
  1. required bool enabled,
  2. required bool useTexture,
  3. ExternalVideoSourceType sourceType = ExternalVideoSourceType.videoFrame,
  4. SenderOptions encodedVideoOption = const SenderOptions(),
})

Configures the external video source.

Call this method before joining a channel.

  • enabled Whether 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.
  • useTexture Whether 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.
  • sourceType Whether the external video frame is encoded. See ExternalVideoSourceType.
  • encodedVideoOption Video 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. < 0: Failure.

Implementation

Future<void> setExternalVideoSource(
    {required bool enabled,
    required bool useTexture,
    ExternalVideoSourceType sourceType = ExternalVideoSourceType.videoFrame,
    SenderOptions encodedVideoOption = const SenderOptions()});