|
|
@@ -1,6 +1,7 @@
|
|
|
"use strict";
|
|
|
var h;
|
|
|
var counter = 0;
|
|
|
+var resizeFlag = true;
|
|
|
function n(a) {
|
|
|
var b = 0;
|
|
|
return function () {
|
|
|
@@ -762,12 +763,16 @@ function na(a) {
|
|
|
a.f.decodeLatency =
|
|
|
0.9 * a.f.decodeLatency +
|
|
|
0.1 * (performance.now() - b.timestamp / 1e3);
|
|
|
- a.c.width = Math.round(
|
|
|
- document.body.clientWidth * window.devicePixelRatio
|
|
|
- );
|
|
|
- a.c.height = Math.round(
|
|
|
- document.body.clientHeight * window.devicePixelRatio
|
|
|
- );
|
|
|
+ if (resizeFlag) {
|
|
|
+ a.c.width = Math.round(
|
|
|
+ document.body.clientWidth * window.devicePixelRatio
|
|
|
+ );
|
|
|
+ a.c.height = Math.round(
|
|
|
+ document.body.clientHeight * window.devicePixelRatio
|
|
|
+ );
|
|
|
+ resizeFlag = false;
|
|
|
+ }
|
|
|
+
|
|
|
var d = b.displayWidth / b.displayHeight,
|
|
|
f = 0,
|
|
|
g = 0;
|
|
|
@@ -780,6 +785,7 @@ function na(a) {
|
|
|
f = (a.c.width - l) / 2;
|
|
|
} else (l = a.c.width), (d = a.c.width / d), (g = (a.c.height - d) / 2);
|
|
|
if (counter === 0) {
|
|
|
+ console.log(a);
|
|
|
a.l.drawImage(
|
|
|
b,
|
|
|
0,
|
|
|
@@ -791,20 +797,8 @@ function na(a) {
|
|
|
l,
|
|
|
d
|
|
|
);
|
|
|
- console.log(
|
|
|
- "draw canvas",
|
|
|
- 0,
|
|
|
- 0,
|
|
|
- a.f.frameWidth,
|
|
|
- a.f.frameHeight,
|
|
|
- f,
|
|
|
- g,
|
|
|
- l,
|
|
|
- d
|
|
|
- );
|
|
|
-
|
|
|
}
|
|
|
- counter = (counter + 1) % 50;
|
|
|
+ counter = (counter + 1) % 10;
|
|
|
b.close();
|
|
|
});
|
|
|
},
|
|
|
@@ -945,7 +939,7 @@ Parsec.prototype.clientNewAttempt = function (a) {
|
|
|
"configured" != b.i.state &&
|
|
|
b.i.configure({
|
|
|
codec: "avc1.42001e",
|
|
|
- hardwareAcceleration: "prefer-hardware",
|
|
|
+ hardwareAcceleration: "prefer-software",
|
|
|
optimizeForLatency: !0,
|
|
|
});
|
|
|
c = new EncodedVideoChunk({
|
|
|
@@ -954,12 +948,7 @@ Parsec.prototype.clientNewAttempt = function (a) {
|
|
|
timestamp: 1e3 * performance.now(),
|
|
|
duration: 0,
|
|
|
});
|
|
|
- try {
|
|
|
- console.log("video decode");
|
|
|
- b.i.decode(c);
|
|
|
- } catch (e) {
|
|
|
- console.trace(e);
|
|
|
- }
|
|
|
+ b.i.decode(c);
|
|
|
});
|
|
|
V(b.b, "audio", 2, null, function (c) {
|
|
|
"configured" != b.g.state &&
|