protected async ValueTask SelectCamera(string deviceId) { await JavaScript.StartVideoAsync(deviceId, "#camera"); _activeCamera = deviceId; if (CameraChanged.HasDelegate) { await CameraChanged.InvokeAsync(_activeCamera); } }
protected async ValueTask SelectCamera(string deviceId, bool persist = true) { if (persist) { await JavaScript.SetAsync(DefaultDeviceId, deviceId); } await JavaScript.StartVideoAsync(deviceId, "#camera"); _activeCamera = deviceId; if (CameraChanged.HasDelegate) { await CameraChanged.InvokeAsync(_activeCamera); } }