fetchStream
fetchStream
method retrieves the stream from the device for the specified media kind. If no preferred device is found, it will throw an error.
Parameters
Name | Type | Description |
---|---|---|
mediaDeviceKind | 'mic' | 'cam' | Type of device |
Example
final stream = await huddleClient.localPeer.deviceHandler.fetchStream({
mediaDevice: CustomMediaDevice.cam,
});
stopStream
stopStream
method stops the stream from the device for the specified media kind. If no preferred device is found, it will throw an error.
Parameters
Name | Type | Description |
---|---|---|
mediaDeviceKind | 'mic' | 'cam' | Type of device |
Example
await huddleClient.localPeer.deviceHandler.stopStream(stream);