useVideoDevice method

Future<void> useVideoDevice(
  1. String deviceID,
  2. {ZegoPublishChannel? channel}
)

Chooses to use the specified video device (for the specified channel).

When to call: After startPreview or startPublishingStream. Caution: Only for Windows / macOS / Web. Note: This function is only available in ZegoExpressVideo SDK!

  • deviceID ID of a device obtained by getVideoDeviceList
  • channel Publishing stream channel

Implementation

Future<void> useVideoDevice(String deviceID,
    {ZegoPublishChannel? channel}) async {
  return await ZegoExpressImpl.instance
      .useVideoDevice(deviceID, channel: channel);
}