Timothy J. Baek 11 months ago
parent
commit
508e8eb4b1
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/lib/components/chat/MessageInput/CallOverlay.svelte

+ 6 - 2
src/lib/components/chat/MessageInput/CallOverlay.svelte

@@ -8,6 +8,7 @@
 
 
 	import Tooltip from '$lib/components/common/Tooltip.svelte';
 	import Tooltip from '$lib/components/common/Tooltip.svelte';
 	import VideoInputMenu from './CallOverlay/VideoInputMenu.svelte';
 	import VideoInputMenu from './CallOverlay/VideoInputMenu.svelte';
+	import { get } from 'svelte/store';
 
 
 	const i18n = getContext('i18n');
 	const i18n = getContext('i18n');
 
 
@@ -364,8 +365,11 @@
 				});
 				});
 			}
 			}
 
 
-			video.srcObject = cameraStream;
-			await video.play();
+			if (cameraStream) {
+				await getVideoInputDevices();
+				video.srcObject = cameraStream;
+				await video.play();
+			}
 		}
 		}
 	};
 	};