File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -36,17 +36,14 @@ func _reload_camera_list() -> void:
3636 print ("CAMERA permission not granted" )
3737 return
3838
39+ if not CameraServer .camera_feeds_updated .is_connected (_on_camera_feeds_updated ):
40+ CameraServer .camera_feeds_updated .connect (_on_camera_feeds_updated )
3941 if CameraServer .monitoring_feeds :
4042 CameraServer .monitoring_feeds = false
4143 await get_tree ().process_frame
4244 CameraServer .monitoring_feeds = true
43- await get_tree ().process_frame
44- # Wait for monitoring to be ready on web platform
45- if os_name == "Web" :
46- while not CameraServer .monitoring_feeds :
47- await get_tree ().process_frame
4845
49- func _on_feeds_update () -> void :
46+ func _on_camera_feeds_updated () -> void :
5047 # Get available camera feeds
5148 var feeds = CameraServer .feeds ()
5249 if feeds .is_empty ():
You can’t perform that action at this time.
0 commit comments