File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed
BootstrapBlazor.Server/Components/Samples
BootstrapBlazor/Services/MediaDevices Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,13 @@ private async Task OnOpenVideo()
4444
4545 private async Task OnCloseVideo ( )
4646 {
47- await VideoDeviceService . Close ( ".bb-video" ) ;
47+ await Task . Delay ( 1 ) ;
48+ //await VideoDeviceService.Close(".bb-video");
4849 }
4950
5051 private async Task OnCapture ( )
5152 {
52- await VideoDeviceService . Capture ( ".bb-video" ) ;
53+ await Task . Delay ( 1 ) ;
54+ //await VideoDeviceService.Capture(".bb-video");
5355 }
5456}
Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ public async Task Open(MediaTrackConstraints constraints)
2929 await module . InvokeVoidAsync ( "open" , constraints ) ;
3030 }
3131
32- public async Task Close ( string selector )
32+ public async Task Close ( )
3333 {
3434 var module = await LoadModule ( ) ;
35- await module . InvokeVoidAsync ( "close" , selector ) ;
35+ await module . InvokeVoidAsync ( "close" , "" ) ;
3636 }
3737
38- public async Task Capture ( string selector )
38+ public async Task Capture ( )
3939 {
4040 var module = await LoadModule ( ) ;
41- await module . InvokeVoidAsync ( "capture" , selector ) ;
41+ await module . InvokeVoidAsync ( "capture" , "" ) ;
4242 }
4343}
Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ public Task Open(MediaTrackConstraints constraints)
2929
3030 public Task Close ( )
3131 {
32- return deviceService . Close ( selector ) ;
32+ return deviceService . Close ( ) ;
3333 }
3434
3535 public Task Capture ( )
3636 {
37- return deviceService . Capture ( selector ) ;
37+ return deviceService . Capture ( ) ;
3838 }
3939
4040 public Task Preview ( )
Original file line number Diff line number Diff line change @@ -26,14 +26,12 @@ public interface IMediaDevices
2626 /// <summary>
2727 /// The close() method of the MediaDevices interface stops capturing media from the specified device and closes the MediaStream object.
2828 /// </summary>
29- /// <param name="selector"></param>
3029 /// <returns></returns>
31- Task Close ( string selector ) ;
30+ Task Close ( ) ;
3231
3332 /// <summary>
3433 /// The capture() method of the MediaDevices interface captures a still image from the specified video stream and saves it to the specified location.
3534 /// </summary>
36- /// <param name="selector"></param>
3735 /// <returns></returns>
38- Task Capture ( string selector ) ;
36+ Task Capture ( ) ;
3937}
You can’t perform that action at this time.
0 commit comments