hotfix: use ndi camera
This commit is contained in:
parent
bb95ca18d7
commit
bde1cc1cc2
File diff suppressed because one or more lines are too long
19
script.js
19
script.js
|
@ -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)
|
.then(onLocalTracks)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
throw error;
|
throw error;
|
||||||
|
@ -534,4 +549,4 @@ function addLocalTrack(track) {
|
||||||
if(useLocalVideo) {
|
if(useLocalVideo) {
|
||||||
room.addTrack(track);
|
room.addTrack(track);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue