|
@@ -473,6 +473,7 @@ export default class Workers {
|
|
this.getPtr = (this.getPtr + 1) % this.cachedLength
|
|
this.getPtr = (this.getPtr + 1) % this.cachedLength
|
|
}
|
|
}
|
|
const s = e.data.metadata;
|
|
const s = e.data.metadata;
|
|
|
|
+ console.log('接受的webrtc数据:'+JSON.stringify(s));
|
|
if ((b = s == null ? void 0 : s.traceIds) != null && b.length)
|
|
if ((b = s == null ? void 0 : s.traceIds) != null && b.length)
|
|
for (const k of s.traceIds) {
|
|
for (const k of s.traceIds) {
|
|
if (this.traceIdMap.has(k)) {
|
|
if (this.traceIdMap.has(k)) {
|
|
@@ -628,7 +629,7 @@ export default class Workers {
|
|
break
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
case 5:
|
|
- console.log('接受webrtc请求(来自worker):'+JSON.stringify(s.data.metadata))
|
|
|
|
|
|
+ //console.log('接受webrtc请求(来自worker):'+JSON.stringify(s.data.metadata))
|
|
this.executeFunction("signal", {
|
|
this.executeFunction("signal", {
|
|
signal: s.data.metadata,
|
|
signal: s.data.metadata,
|
|
pts: -1,
|
|
pts: -1,
|
|
@@ -765,7 +766,7 @@ export default class Workers {
|
|
this.moveDisplayCircular.add(_e),
|
|
this.moveDisplayCircular.add(_e),
|
|
this.lastMoveDisplayTime = $
|
|
this.lastMoveDisplayTime = $
|
|
}
|
|
}
|
|
- console.log('接受webrtc请求(定时执行UpdateYUV):'+JSON.stringify(this.cachedMetas[e]))
|
|
|
|
|
|
+ //console.log('接受webrtc请求(定时执行UpdateYUV):'+JSON.stringify(this.cachedMetas[e]))
|
|
this.executeFunction("signal", {
|
|
this.executeFunction("signal", {
|
|
signal: this.cachedMetas[e],
|
|
signal: this.cachedMetas[e],
|
|
pts: this.cachedPtss[e],
|
|
pts: this.cachedPtss[e],
|
|
@@ -951,7 +952,7 @@ export default class Workers {
|
|
};
|
|
};
|
|
if (this.inPanoMode)
|
|
if (this.inPanoMode)
|
|
{
|
|
{
|
|
- console.log('接受webrtc请求:'+JSON.stringify(Mt));
|
|
|
|
|
|
+ //console.log('接受webrtc请求:'+JSON.stringify(Mt));
|
|
this.executeFunction("signal", {
|
|
this.executeFunction("signal", {
|
|
signal: Mt,
|
|
signal: Mt,
|
|
pts: -1,
|
|
pts: -1,
|
|
@@ -1024,7 +1025,7 @@ export default class Workers {
|
|
};
|
|
};
|
|
if (this.inPanoMode)
|
|
if (this.inPanoMode)
|
|
{
|
|
{
|
|
- console.log('接受webrtc请求:'+JSON.stringify(Rt));
|
|
|
|
|
|
+ //console.log('接受webrtc请求:'+JSON.stringify(Rt));
|
|
this.executeFunction("signal", {
|
|
this.executeFunction("signal", {
|
|
signal: Rt,
|
|
signal: Rt,
|
|
pts: -1,
|
|
pts: -1,
|
|
@@ -1081,7 +1082,7 @@ export default class Workers {
|
|
dataHandle(e) {
|
|
dataHandle(e) {
|
|
|
|
|
|
if(this.saveframe){
|
|
if(this.saveframe){
|
|
- console.log('接受webrtc请求:录制视频')
|
|
|
|
|
|
+ //console.log('接受webrtc请求:录制视频')
|
|
this.decoderWorker.postMessage({
|
|
this.decoderWorker.postMessage({
|
|
t: 6
|
|
t: 6
|
|
});
|
|
});
|
|
@@ -1089,7 +1090,7 @@ export default class Workers {
|
|
}
|
|
}
|
|
|
|
|
|
if(this.SaveMediaStream){
|
|
if(this.SaveMediaStream){
|
|
- console.log('接受webrtc请求:下载视频')
|
|
|
|
|
|
+ //console.log('接受webrtc请求:下载视频')
|
|
this.decoderWorker.postMessage({
|
|
this.decoderWorker.postMessage({
|
|
t: 7
|
|
t: 7
|
|
}),
|
|
}),
|
|
@@ -1099,23 +1100,23 @@ export default class Workers {
|
|
const i = new Uint8Array(e);
|
|
const i = new Uint8Array(e);
|
|
if (i.length >= 4 && this.isHeartBeatPacket(i.buffer, i.length) == !0)
|
|
if (i.length >= 4 && this.isHeartBeatPacket(i.buffer, i.length) == !0)
|
|
{
|
|
{
|
|
- console.log('接受webrtc请求:心跳')
|
|
|
|
|
|
+ //console.log('接受webrtc请求:心跳')
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (i.length > 36 && this.unmarshalStream(i.buffer) == !0) {
|
|
if (i.length > 36 && this.unmarshalStream(i.buffer) == !0) {
|
|
this.reconnectSignal && (this.executeFunction("reconnectedFrame", {}),
|
|
this.reconnectSignal && (this.executeFunction("reconnectedFrame", {}),
|
|
this.reconnectSignal = !1);
|
|
this.reconnectSignal = !1);
|
|
- console.log('接受webrtc请求:视频流')
|
|
|
|
|
|
+ //console.log('接受webrtc请求:视频流')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (i.length > 20 && this.unmarshalPano(i.buffer) == !0)
|
|
if (i.length > 20 && this.unmarshalPano(i.buffer) == !0)
|
|
{
|
|
{
|
|
- console.log('接受webrtc请求:全景图')
|
|
|
|
|
|
+ //console.log('接受webrtc请求:全景图')
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.noWasmBytesReceived += e.byteLength;
|
|
this.noWasmBytesReceived += e.byteLength;
|
|
const o = JSON.parse(this.Stringify(i));
|
|
const o = JSON.parse(this.Stringify(i));
|
|
- console.log('接受webrtc请求:'+JSON.stringify(o));
|
|
|
|
|
|
+ console.log('接受webrtc请求(不是心跳,视频):'+JSON.stringify(o));
|
|
this.executeFunction("signal", {
|
|
this.executeFunction("signal", {
|
|
signal: o,
|
|
signal: o,
|
|
pts: -1,
|
|
pts: -1,
|