hotfix: use ndi camera

This commit is contained in:
henne 2020-12-26 23:44:58 +01:00
parent bb95ca18d7
commit bde1cc1cc2
2 changed files with 22 additions and 24 deletions

File diff suppressed because one or more lines are too long

View File

@ -522,8 +522,23 @@ function onLocalTracks(tracks) {
}
}
}
let camera = "";
navigator.mediaDevices.enumerateDevices()
.then(function(devices) {
devices.forEach(function(device) {
console.log(device.kind + ": " + device.label +
" id = " + device.deviceId);
if(device.label.indexOf("NDI") != -1) {
camera = device.deviceId;
}
});
})
.catch(function(err) {
console.log(err.name + ": " + err.message);
});
JitsiMeetJS.createLocalTracks({ devices: [ 'video' ] })
JitsiMeetJS.createLocalTracks({ devices: [ 'video' ], cameraDeviceId: camera })
.then(onLocalTracks)
.catch(error => {
throw error;
@ -534,4 +549,4 @@ function addLocalTrack(track) {
if(useLocalVideo) {
room.addTrack(track);
}
}
}