[call-me] - fix swap camera on mobile

This commit is contained in:
Miroslav Pejic
2026-02-15 21:29:59 +01:00
parent dd5129520f
commit 2930327322
3 changed files with 13 additions and 3 deletions
+2 -2
View File
@@ -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
View File
@@ -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",
+10
View File
@@ -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);