[call-me] - fix swap camera on mobile
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "call-me",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "call-me",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12",
|
||||
"license": "AGPLv3",
|
||||
"dependencies": {
|
||||
"@ngrok/ngrok": "1.7.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "call-me",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12",
|
||||
"description": "Your Go-To for Instant Video Calls",
|
||||
"author": "Miroslav Pejic - miroslav.pejic.85@gmail.com",
|
||||
"license": "AGPLv3",
|
||||
|
||||
@@ -1074,6 +1074,16 @@ async function swapCamera() {
|
||||
if (videoTrack) {
|
||||
videoTrack.stop();
|
||||
}
|
||||
|
||||
// Update selectedDevices.videoInput so video toggle re-acquires the correct camera
|
||||
const newVideoTrack = newStream.getVideoTracks()[0];
|
||||
if (newVideoTrack) {
|
||||
const newSettings = newVideoTrack.getSettings();
|
||||
if (newSettings.deviceId) {
|
||||
selectedDevices.videoInput = newSettings.deviceId;
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh video streams
|
||||
refreshLocalVideoStream(newStream);
|
||||
await refreshPeerVideoStreams(newStream);
|
||||
|
||||
Reference in New Issue
Block a user