File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
src/BootstrapBlazor.Server/Components/Samples Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ private IBluetooth? BluetoothService { get; set; }</Pre>
1414 <div class =" row form-inline g-3" >
1515 <div class =" col-12" >
1616 <Button Text =" @Localizer[" VideoDeviceRequestText " ]" Icon =" fa-solid fa-photo-film" OnClick =" OnRequestDevice" ></Button >
17- <Button Text =" @Localizer[" VideoDeviceOpenText " ]" Icon =" fa-solid fa-play" OnClick =" OnOpenVideo" IsDisabled =" _isOpen" class =" ms-2" ></Button >
17+ <Button Text =" @Localizer[" VideoDeviceOpenText " ]" Icon =" fa-solid fa-play" OnClick =" OnOpenVideo" IsDisabled =" _isOpen || string.IsNullOrEmpty(_deviceId) " class =" ms-2" ></Button >
1818 <Button Text =" @Localizer[" VideoDeviceCloseText " ]" Icon =" fa-solid fa-stop" OnClick =" OnCloseVideo" IsDisabled =" !_isOpen" class =" ms-2" ></Button >
1919 <Button Text =" @Localizer[" VideoDeviceCaptureText " ]" Icon =" fa-solid fa-camera" OnClick =" OnCapture" IsDisabled =" !_isOpen" class =" ms-2" ></Button >
2020 </div >
Original file line number Diff line number Diff line change @@ -43,12 +43,13 @@ private async Task OnOpenVideo()
4343 DeviceId = _deviceId ,
4444 VideoSelector = ".bb-video"
4545 } ;
46- _isOpen = await VideoDeviceService . Open ( constraints ) ;
46+ _isOpen = await VideoDeviceService . Open ( constraints ) ;
4747 }
4848 }
4949
5050 private async Task OnCloseVideo ( )
5151 {
52+ _isOpen = false ;
5253 _previewUrl = "" ;
5354 await VideoDeviceService . Close ( ".bb-video" ) ;
5455 }
You can’t perform that action at this time.
0 commit comments