Commit 5b629053 by Иван Кубота

some fixes

parent c0bd960a
......@@ -94,9 +94,24 @@ Screen.Conference = function() {
var cameraID = 0;
var remoteVideoEl = D.div({cls: 'remote-video'});
var instanciating = 0;
store.sub(['appLoaded', 'callScreenCamerasTune', 'cameraID'], function(loaded, tune) {
if(!loaded)
return
if(!tune)
return;
if(instanciating<2){
instanciating++;
setTimeout(function() {
usersBlock.appendChild( generateCameraUI() )
}, 300);
}
});
var generateCameraUI = function() {
var currentCameraID = cameraID;
cameraID++;
store.set('cameraID', cameraID);
var camTypes = store.get('webcamtypes');
store.set('webcam'+currentCameraID, camTypes[currentCameraID % camTypes.length].value);
......@@ -217,6 +232,7 @@ Screen.Conference = function() {
});
window.instances || (window.instances = []);
var RTCinstance;
store.sub(['appLoaded'], function(loaded, callScreenCamerasTune) {
if(!loaded)// || !callScreenCamerasTune)
return;
......@@ -231,6 +247,7 @@ Screen.Conference = function() {
var slots = {
OfficeUser: {1: 0, 2: 1},
OfficeUserLeft: {1: 0, 2: 1},
RemoteUser: {1: 2, 2: 3},
};
......@@ -262,9 +279,6 @@ Screen.Conference = function() {
var segmentation = async function() {
if( store.get( 'callScreenCamerasTune' ) ){
if(cameraID<3){
usersBlock.appendChild( generateCameraUI() )
}
if( video1.videoWidth > 10 && store.get( 'videoinput' + currentCameraID ) ){
try{
await selfieSegmentation.send( { image: video1 } );
......
......@@ -24,6 +24,7 @@ export class VideoInputApp {
public constructor() {
this.mNetConfig.IceServers = [
{ urls: 'turn:turn.because-why-not.com:443', username:'testuser14', credential: 'pass14' },
{ urls: "stun:stun.l.google.com:19302" },
{ urls: 'stun:stun.l.google.com:19302'}
/*{ urls: 'stun:stun1.l.google.com:19302'},
{ urls: 'stun:stun2.l.google.com:19302'},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment