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

720p

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