Commit 490638d6 by Иван Кубота

720p

parent 736f3b0a
...@@ -14,9 +14,10 @@ Screen.Conference = function() { ...@@ -14,9 +14,10 @@ Screen.Conference = function() {
const media = new awrtc.Media(); const media = new awrtc.Media();
awrtc.Media.SharedInstance.VideoInput.AddCanvasDevice(canvas, devname, canvas.width / 2, canvas.height / 2, 30); awrtc.Media.SharedInstance.VideoInput.AddCanvasDevice(canvas, devname, canvas.width , canvas.height , 30);
setInterval(() => { setInterval(() => {
console.log(222);
awrtc.Media.SharedInstance.VideoInput.UpdateFrame(devname); awrtc.Media.SharedInstance.VideoInput.UpdateFrame(devname);
}, 50); }, 50);
//apps.VideoInputApp.sVideoDevice = devname; //apps.VideoInputApp.sVideoDevice = devname;
...@@ -108,7 +109,7 @@ Screen.Conference = function() { ...@@ -108,7 +109,7 @@ Screen.Conference = function() {
canvasResizerEl = CanvasResizer( canvasResizerEl = CanvasResizer(
cameraCanvas = D.h( 'canvas', { cameraCanvas = D.h( 'canvas', {
cls: "output_canvas", cls: "output_canvas",
width: "640px", width: "720px",
height: "480px", height: "480px",
style: { style: {
/*display: 'none',*/ /*display: 'none',*/
...@@ -141,11 +142,13 @@ Screen.Conference = function() { ...@@ -141,11 +142,13 @@ Screen.Conference = function() {
var video1 = D.h('video'); var video1 = D.h('video');
var cameraCanvasCtx = cameraCanvas.getContext('2d'); var cameraCanvasCtx = cameraCanvas.getContext('2d');
var updateVideos = function() { /* var updateVideos = function() {
console.log(111);
cameraCanvasCtx.drawImage(video1,0,0); cameraCanvasCtx.drawImage(video1,0,0);
requestAnimationFrame(updateVideos); requestAnimationFrame(updateVideos);
}; };
requestAnimationFrame(updateVideos); requestAnimationFrame(updateVideos);*/
store.sub(['inputsSetted'], (is) => { store.sub(['inputsSetted'], (is) => {
/*store.set('videoinput1', devices.videoinput[devices.videoinput.length - 1].value); /*store.set('videoinput1', devices.videoinput[devices.videoinput.length - 1].value);
...@@ -206,7 +209,7 @@ Screen.Conference = function() { ...@@ -206,7 +209,7 @@ Screen.Conference = function() {
}); });
window.instances || (window.instances = []);
var RTCinstance; var RTCinstance;
store.sub('appLoaded', function(loaded) { store.sub('appLoaded', function(loaded) {
if(!loaded) if(!loaded)
...@@ -217,6 +220,7 @@ Screen.Conference = function() { ...@@ -217,6 +220,7 @@ Screen.Conference = function() {
currentUserID, currentUserID,
currentUserID ? null : remoteVideoEl currentUserID ? null : remoteVideoEl
); );
window.instances.push(RTCinstance);
RTCinstance.mUiRemoteVideoParent = currentUserID ? null : remoteVideoEl; RTCinstance.mUiRemoteVideoParent = currentUserID ? null : remoteVideoEl;
var selfieSegmentation = new SelfieSegmentation( { var selfieSegmentation = new SelfieSegmentation( {
...@@ -377,9 +381,14 @@ Screen.Conference = function() { ...@@ -377,9 +381,14 @@ Screen.Conference = function() {
navigator.mediaDevices.enumerateDevices().then(gotDevices).catch(handleError); navigator.mediaDevices.enumerateDevices().then(gotDevices).catch(handleError);
setInterval(function() { var soundDisablerID = setInterval(function() {
D('video').map(a=>a.muted = true) D('video').map(a=>a.muted = true)
}, 2000); }, 2000);
window.enableSound = function() {
clearInterval(soundDisablerID);
D('video').map(a=>a.muted = false)
}
})(); })();
return dom; return dom;
}; };
\ No newline at end of file
...@@ -71,6 +71,8 @@ export class VideoInputApp { ...@@ -71,6 +71,8 @@ export class VideoInputApp {
config.Audio = audio; config.Audio = audio;
config.Video = video; config.Video = video;
config.IdealWidth = 640; config.IdealWidth = 640;
config.MinWidth = 640;
config.MinHeight = 480;
config.IdealHeight = 480; config.IdealHeight = 480;
config.IdealFps = 30; config.IdealFps = 30;
if (this.sVideoDevice !== null) { if (this.sVideoDevice !== null) {
......
...@@ -528,8 +528,8 @@ export class BrowserMediaStream { ...@@ -528,8 +528,8 @@ export class BrowserMediaStream {
var videoElement: HTMLVideoElement= document.createElement("video"); var videoElement: HTMLVideoElement= document.createElement("video");
//width/doesn't seem to be important //width/doesn't seem to be important
videoElement.width = 320; videoElement.width = 640;
videoElement.height = 240; videoElement.height = 480;
videoElement.controls = true; videoElement.controls = true;
videoElement.setAttribute("playsinline", ""); videoElement.setAttribute("playsinline", "");
videoElement.id = "awrtc_mediastream_video_" + this.mInstanceId; videoElement.id = "awrtc_mediastream_video_" + this.mInstanceId;
......
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