Commit 5d26895c authored by 邹绪超's avatar 邹绪超

fix: 修复录音显示异常

parent 733f62d1
Pipeline #85865 waiting for manual action with stages
!function() {
"use strict";
function t(t) {
return function(t) {
if (Array.isArray(t))
return e(t)
}(t) || function(t) {
if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"])
return Array.from(t)
}(t) || function(t, r) {
if (!t)
return;
if ("string" == typeof t)
return e(t, r);
var i = Object.prototype.toString.call(t).slice(8, -1);
"Object" === i && t.constructor && (i = t.constructor.name);
if ("Map" === i || "Set" === i)
return Array.from(t);
if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))
return e(t, r)
}(t) || function() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}()
}
function e(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var r = 0, i = new Array(e); r < e; r++)
i[r] = t[r];
return i
}
function r(t, e, r, i) {
this.fromSampleRate = t,
this.toSampleRate = e,
this.channels = 0 | r,
this.noReturn = !!i,
this.initialize()
}
r.prototype.initialize = function() {
if (!(this.fromSampleRate > 0 && this.toSampleRate > 0 && this.channels > 0))
throw new Error("Invalid settings specified for the resampler.");
this.fromSampleRate == this.toSampleRate ? (this.resampler = this.bypassResampler,
this.ratioWeight = 1) : (this.fromSampleRate < this.toSampleRate ? (this.lastWeight = 1,
this.resampler = this.compileLinearInterpolation) : (this.tailExists = !1,
this.lastWeight = 0,
this.resampler = this.compileMultiTap),
this.ratioWeight = this.fromSampleRate / this.toSampleRate)
}
,
r.prototype.compileLinearInterpolation = function(t) {
var e = t.length;
this.initializeBuffers(e);
var r, i, s = this.outputBufferSize, a = this.ratioWeight, f = this.lastWeight, n = 0, o = 0, h = 0, l = this.outputBuffer;
if (e % this.channels == 0) {
if (e > 0) {
for (; f < 1; f += a)
for (n = 1 - (o = f % 1),
r = 0; r < this.channels; ++r)
l[h++] = this.lastOutput[r] * n + t[r] * o;
for (f--,
e -= this.channels,
i = Math.floor(f) * this.channels; h < s && i < e; ) {
for (n = 1 - (o = f % 1),
r = 0; r < this.channels; ++r)
l[h++] = t[i + r] * n + t[i + this.channels + r] * o;
f += a,
i = Math.floor(f) * this.channels
}
for (r = 0; r < this.channels; ++r)
this.lastOutput[r] = t[i++];
return this.lastWeight = f % 1,
this.bufferSlice(h)
}
return this.noReturn ? 0 : []
}
throw new Error("Buffer was of incorrect sample length.")
}
,
r.prototype.compileMultiTap = function(t) {
var e = []
, r = t.length;
this.initializeBuffers(r);
var i = this.outputBufferSize;
if (r % this.channels == 0) {
if (r > 0) {
for (var s = this.ratioWeight, a = 0, f = 0; f < this.channels; ++f)
e[f] = 0;
var n = 0
, o = 0
, h = !this.tailExists;
this.tailExists = !1;
var l = this.outputBuffer
, u = 0
, p = 0;
do {
if (h)
for (a = s,
f = 0; f < this.channels; ++f)
e[f] = 0;
else {
for (a = this.lastWeight,
f = 0; f < this.channels; ++f)
e[f] += this.lastOutput[f];
h = !0
}
for (; a > 0 && n < r; ) {
if (!(a >= (o = 1 + n - p))) {
for (f = 0; f < this.channels; ++f)
e[f] += t[n + f] * a;
p += a,
a = 0;
break
}
for (f = 0; f < this.channels; ++f)
e[f] += t[n++] * o;
p = n,
a -= o
}
if (0 != a) {
for (this.lastWeight = a,
f = 0; f < this.channels; ++f)
this.lastOutput[f] = e[f];
this.tailExists = !0;
break
}
for (f = 0; f < this.channels; ++f)
l[u++] = e[f] / s
} while (n < r && u < i);
return this.bufferSlice(u)
}
return this.noReturn ? 0 : []
}
throw new Error("Buffer was of incorrect sample length.")
}
,
r.prototype.bypassResampler = function(t) {
return this.noReturn ? (this.outputBuffer = t,
t.length) : t
}
,
r.prototype.bufferSlice = function(t) {
if (this.noReturn)
return t;
try {
return this.outputBuffer.subarray(0, t)
} catch (e) {
try {
return this.outputBuffer.length = t,
this.outputBuffer
} catch (e) {
return this.outputBuffer.slice(0, t)
}
}
}
,
r.prototype.initializeBuffers = function(t) {
this.outputBufferSize = Math.ceil(t * this.toSampleRate / this.fromSampleRate);
try {
this.outputBuffer = new Float32Array(this.outputBufferSize),
this.lastOutput = new Float32Array(this.channels)
} catch (t) {
this.outputBuffer = [],
this.lastOutput = []
}
}
,
self.transData = function(t) {
return "short16" === self.arrayBufferType && (t = function(t) {
for (var e = new ArrayBuffer(2 * t.length), r = new DataView(e), i = 0, s = 0; s < t.length; s += 1,
i += 2) {
var a = Math.max(-1, Math.min(1, t[s]));
r.setInt16(i, a < 0 ? 32768 * a : 32767 * a, !0)
}
return r.buffer
}(t = self.resampler.resampler(t))),
t
}
,
self.onmessage = function(e) {
var i = e.data
, s = i.type
, a = i.data;
if ("init" === s) {
var f = a.frameSize
, n = a.toSampleRate
, o = a.fromSampleRate
, h = a.arrayBufferType;
return self.frameSize = f * Math.floor(o / n),
self.resampler = new r(o,n,1),
self.frameBuffer = [],
void (self.arrayBufferType = h)
}
if ("stop" === s && (self.postMessage({
frameBuffer: self.transData(self.frameBuffer),
isLastFrame: !0,
vol : Math.max.apply(Math, this.frameBuffer) * 100
}),
self.frameBuffer = []),
"message" === s) {
var l, u = a;
if (self.frameSize)
return (l = self.frameBuffer).push.apply(l, t(u)),
self.frameBuffer.length >= self.frameSize && (self.postMessage({
frameBuffer: self.transData(this.frameBuffer),
isLastFrame: !1,
vol : Math.max.apply(Math, this.frameBuffer) * 100
}),
self.frameBuffer = []),
!0;
u && self.postMessage({
frameBuffer: self.transData(u),
isLastFrame: !1,
vol : Math.max.apply(Math, this.frameBuffer) * 100
})
}
}
}();
!function(){"use strict";function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,o=void 0,"symbol"==typeof(o=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"))?o:String(o)),n)}var i,o}function e(t){return e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},e(t)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,e,o){return i=n()?Reflect.construct.bind():function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&r(o,n.prototype),o},i.apply(null,arguments)}function o(t){var n="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||(o=t,-1===Function.toString.call(o).indexOf("[native code]")))return t;var o;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,a)}function a(){return i(t,arguments,e(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r(a,t)},o(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){var r=n();return function(){var n,i=e(t);if(r){var o=e(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}(this,n)}}function f(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e,r,n){this.fromSampleRate=t,this.toSampleRate=e,this.channels=0|r,this.noReturn=!!n,this.initialize()}l.prototype.initialize=function(){if(!(this.fromSampleRate>0&&this.toSampleRate>0&&this.channels>0))throw new Error("Invalid settings specified for the resampler.");this.fromSampleRate==this.toSampleRate?(this.resampler=this.bypassResampler,this.ratioWeight=1):(this.fromSampleRate<this.toSampleRate?(this.lastWeight=1,this.resampler=this.compileLinearInterpolation):(this.tailExists=!1,this.lastWeight=0,this.resampler=this.compileMultiTap),this.ratioWeight=this.fromSampleRate/this.toSampleRate)},l.prototype.compileLinearInterpolation=function(t){var e=t.length;this.initializeBuffers(e);var r,n,i=this.outputBufferSize,o=this.ratioWeight,a=this.lastWeight,s=0,f=0,u=0,l=this.outputBuffer;if(e%this.channels==0){if(e>0){for(;a<1;a+=o)for(s=1-(f=a%1),r=0;r<this.channels;++r)l[u++]=this.lastOutput[r]*s+t[r]*f;for(a--,e-=this.channels,n=Math.floor(a)*this.channels;u<i&&n<e;){for(s=1-(f=a%1),r=0;r<this.channels;++r)l[u++]=t[n+r]*s+t[n+this.channels+r]*f;a+=o,n=Math.floor(a)*this.channels}for(r=0;r<this.channels;++r)this.lastOutput[r]=t[n++];return this.lastWeight=a%1,this.bufferSlice(u)}return this.noReturn?0:[]}throw new Error("Buffer was of incorrect sample length.")},l.prototype.compileMultiTap=function(t){var e=[],r=t.length;this.initializeBuffers(r);var n=this.outputBufferSize;if(r%this.channels==0){if(r>0){for(var i=this.ratioWeight,o=0,a=0;a<this.channels;++a)e[a]=0;var s=0,f=0,u=!this.tailExists;this.tailExists=!1;var l=this.outputBuffer,h=0,c=0;do{if(u)for(o=i,a=0;a<this.channels;++a)e[a]=0;else{for(o=this.lastWeight,a=0;a<this.channels;++a)e[a]+=this.lastOutput[a];u=!0}for(;o>0&&s<r;){if(!(o>=(f=1+s-c))){for(a=0;a<this.channels;++a)e[a]+=t[s+a]*o;c+=o,o=0;break}for(a=0;a<this.channels;++a)e[a]+=t[s++]*f;c=s,o-=f}if(0!=o){for(this.lastWeight=o,a=0;a<this.channels;++a)this.lastOutput[a]=e[a];this.tailExists=!0;break}for(a=0;a<this.channels;++a)l[h++]=e[a]/i}while(s<r&&h<n);return this.bufferSlice(h)}return this.noReturn?0:[]}throw new Error("Buffer was of incorrect sample length.")},l.prototype.bypassResampler=function(t){return this.noReturn?(this.outputBuffer=t,t.length):t},l.prototype.bufferSlice=function(t){if(this.noReturn)return t;try{return this.outputBuffer.subarray(0,t)}catch(e){try{return this.outputBuffer.length=t,this.outputBuffer}catch(e){return this.outputBuffer.slice(0,t)}}},l.prototype.initializeBuffers=function(t){this.outputBufferSize=Math.ceil(t*this.toSampleRate/this.fromSampleRate);try{this.outputBuffer=new Float32Array(this.outputBufferSize),this.lastOutput=new Float32Array(this.channels)}catch(t){this.outputBuffer=[],this.lastOutput=[]}};var h=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}(h,e);var n,i,o,u=s(h);function h(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h);var e=a(t=u.call(this));return t.port.onmessage=function(t){var r=t.data,n=r.type,i=r.data;if(console.log("type",n),"init"===n){var o=i.frameSize,a=i.toSampleRate,s=i.arrayBufferType,f=i.fromSampleRate;return e.frameSize=o*Math.floor(f/a),e.resampler=new l(f,a,1),e.frameBuffer=[],void(e.arrayBufferType=s)}"stop"===n&&(e.port.postMessage({frameBuffer:e.transData(e.frameBuffer),isLastFrame:!0}),e.frameBuffer=[])},t}return n=h,(i=[{key:"process",value:function(t){var e,r=t[0][0];return this.frameSize?((e=this.frameBuffer).push.apply(e,f(r)),this.frameBuffer.length>=this.frameSize&&(this.port.postMessage({frameBuffer:this.transData(this.frameBuffer),isLastFrame:!1}),this.frameBuffer=[]),!0):(r&&this.port.postMessage({frameBuffer:this.transData(r),isLastFrame:!1}),!0)}},{key:"transData",value:function(t){return"short16"===this.arrayBufferType&&(t=function(t){for(var e=new ArrayBuffer(2*t.length),r=new DataView(e),n=0,i=0;i<t.length;i+=1,n+=2){var o=Math.max(-1,Math.min(1,t[i]));r.setInt16(n,o<0?32768*o:32767*o,!0)}return r.buffer}(t=this.resampler.resampler(t))),t}}])&&t(n.prototype,i),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),h}(o(AudioWorkletProcessor));registerProcessor("processor-worklet",h)}();
......@@ -65,11 +65,9 @@ const PandaUi = props => {
events: {
frame(data) {
event.emit('aiSound:frame', data);
console.log(data.resultTextTemp);
},
finish(data) {
event.emit('aiSound:finish', data);
console.log(data.resultText);
},
fail({ data }) {
message.info(data.msg);
......
......@@ -42,6 +42,7 @@ const Dialog = props => {
}, [])
const finish = useCallback(async ({ resultText }) => {
if(!resultText) return
pandaRecordWebSocketRef.current.setStatus("pause")
const directive = directiveRef.current.parse({
text: resultText
......@@ -67,8 +68,7 @@ const Dialog = props => {
const frame = useCallback((data) => {
const { resultText, resultTextTemp } = data
console.log(resultTextTemp)
console.log(resultText)
if(!resultTextTemp) return
setData(data => {
const length = data.length
const lastData = data.at(-1)
......@@ -148,7 +148,7 @@ const Dialog = props => {
<div className={style.toolTipWrapper}>
<ul>
{
AllDirectiveTypes.map((item , index) => <li key={index}>{index + 1}.{item.name}</li>)
AllDirectiveTypes.filter(item => !!item.name).map((item , index) => <li key={index}>{index + 1}.{item.name}</li>)
}
</ul>
</div>
......
......@@ -68,11 +68,6 @@ const PandaTip = props => {
const close = () => {
setStatus("close")
setInitOpen(true)
// let count = 0
// setInterval(() => {
// ++count;
// console.log(count)
// }, 1000)
}
return (<div className={style.container}>
......
......@@ -23,10 +23,9 @@ class PandaRecordWebSocket extends PandaWebSocket {
this.createRecorder();
this.resultText = '';
this.resultTextTemp = '';
this.count = 0;
this.initFrameBuffer = null;
this.status = 'playing';
this.startTime = new Date();
this.frameBuffers = []
this.time = null
}
async start() {
......@@ -34,10 +33,14 @@ class PandaRecordWebSocket extends PandaWebSocket {
if (!data.isSuccess) {
return data;
}
this.createWs();
this.recorderManager.start({
sampleRate: 16000,
frameSize: 1280,
});
return data;
}
async checkParams() {
let data = super.checkParams();
if (!data.isSuccess) return data;
......@@ -73,16 +76,19 @@ class PandaRecordWebSocket extends PandaWebSocket {
}
// worker
if (this.config.worker == undefined) {
this.config.worker = 'https://civgis.panda-water.cn/system/pandaAiSoundWorker';
this.config.worker = '/civbase/assets/pandaAiSound';
}
if (this.config.vol == undefined) {
this.config.vol = 5
}
}
initEvents() {
if (!this.events.recorderStart) {
this.events.recorderStart = function() {};
this.events.recorderStart = function () { };
}
if (!this.events.recorderStop) {
this.events.recorderStop = function() {};
this.events.recorderStop = function () { };
}
}
......@@ -99,13 +105,11 @@ class PandaRecordWebSocket extends PandaWebSocket {
const signatureOrigin = `host: ${PandaRecordWebSocket.host}\ndate: ${date}\nGET /v2/iat HTTP/1.1`;
const signatureSha = CryptoJS.HmacSHA256(signatureOrigin, apiSecret);
const signature = CryptoJS.enc.Base64.stringify(signatureSha);
const authorizationOrigin = `api_key="${apiKey}", algorithm="${PandaRecordWebSocket.algorithm}", headers="${
PandaRecordWebSocket.headers
}", signature="${signature}"`;
const authorizationOrigin = `api_key="${apiKey}", algorithm="${PandaRecordWebSocket.algorithm}", headers="${PandaRecordWebSocket.headers
}", signature="${signature}"`;
const authorization = btoa(authorizationOrigin);
const url = `${PandaRecordWebSocket.url}?authorization=${authorization}&date=${date}&host=${
PandaRecordWebSocket.host
}`;
const url = `${PandaRecordWebSocket.url}?authorization=${authorization}&date=${date}&host=${PandaRecordWebSocket.host
}`;
return url;
}
......@@ -124,115 +128,30 @@ class PandaRecordWebSocket extends PandaWebSocket {
this.events.recorderStop();
}
getIsEmptyData(buffer, length, count) {
let _count = 0;
let isEmpty = true;
const array = new Uint8Array(buffer);
for (let i = 0; i < length; ++i) {
if (array[i] != 0) {
_count++;
}
if (_count >= count) {
isEmpty = false;
break;
}
async onRecorderFrameRecorded({ isLastFrame, vol , frameBuffer }) {
if (isLastFrame) {
await this.destroy()
return
}
return isEmpty;
}
onRecorderFrameRecorded({ isLastFrame, frameBuffer }) {
const { encoding, format } = this.config;
if (!this.ws) {
const isEmptyData = this.getIsEmptyData(frameBuffer, 200, 20);
if (isEmptyData) {
this.initFrameBuffer = null;
console.log('系统未检测到输入');
return;
}
if (this.status == 'paused') return;
this.initFrameBuffer = frameBuffer;
this.resultText = '';
this.resultTextTemp = '';
this.createWs();
const isSpeaking = vol - this.config.vol > 0
if (isSpeaking && !this.ws && this.status == "playing") {
this.frameBuffers = [frameBuffer]
this.resultText = ""
this.resultTextTemp = ""
this.createWs()
}
if (this.ws.readyState === this.ws.OPEN) {
// if((new Date().getTime() - this.startTime.getTime()) >= (this.config.vad_eos )) {
// console.log("主动断开")
// this.ws.send(
// JSON.stringify({
// data: {
// format,
// encoding,
// status: 2,
// },
// }),
// );
// this.wsClose()
// } else {
// console.log("2222")
// this.ws.send(
// JSON.stringify({
// data: {
// format,
// encoding,
// status: isLastFrame ? 2 : 1,
// audio: Utils.toBase64(frameBuffer),
// },
// }),
// );
// }
this.ws.send(
JSON.stringify({
data: {
format,
encoding,
status: isLastFrame ? 2 : 1,
audio: Utils.toBase64(frameBuffer),
},
}),
);
if (isLastFrame) {
this.destroy();
}
if (this.ws && [this.ws.CONNECTING, this.ws.OPEN].includes(this.ws.readyState)) {
this.frameBuffers.push(frameBuffer)
}
}
reconnect() {
const { encoding, format } = this.config;
this.count += 1;
if (this.ws && this.ws.readyState === this.ws.OPEN) {
this.ws.send(
JSON.stringify({
data: {
format,
encoding,
status: 2,
},
}),
);
}
this.wsClose();
}
wsOpen(e) {
if (!this.recorderManager) return;
if (this.recorderManager.status != 'open') {
this.recorderManager.start({
sampleRate: 16000,
frameSize: 1280,
});
}
const { appId, vad_eos, dwa, ptt, format, encoding } = this.config;
const data = {
format,
encoding,
status: 0,
};
if (this.initFrameBuffer) {
data.audio = Utils.toBase64(this.initFrameBuffer);
this.initFrameBuffer = null;
}
const params = {
common: {
app_id: appId,
......@@ -248,7 +167,28 @@ class PandaRecordWebSocket extends PandaWebSocket {
data,
};
this.ws.send(JSON.stringify(params));
this.startTime = new Date();
this.startStreamTimeToSocket()
}
startStreamTimeToSocket() {
this.clearTime()
const { format, encoding } = this.config
this.time = setInterval(function () {
if (!this.ws) return
if (this.ws.readyState != this.ws.OPEN) return
const frameBuffer = this.frameBuffers.shift()
if (!frameBuffer) return
this.ws.send(
JSON.stringify({
data: {
format,
encoding,
status: 1,
audio: Utils.toBase64(frameBuffer),
},
})
)
}.bind(this), 40)
}
wsOnmessage(e) {
......@@ -280,17 +220,15 @@ class PandaRecordWebSocket extends PandaWebSocket {
resultTextTemp: this.resultTextTemp,
resultText: this.resultText,
pgs: data.pgs,
count: this.count,
});
}
}
if (jsonData.code == 0 && jsonData.data.status == 2) {
const resultText = this.resultTextTemp ? this.resultTextTemp : this.resultText;
if (!resultText) return;
this.events.finish({
resultText && this.events.finish({
resultText,
});
this.reconnect();
this.wsClose()
}
if (jsonData.code != 0) {
this.events.fail({
......@@ -324,14 +262,20 @@ class PandaRecordWebSocket extends PandaWebSocket {
}
}
clearTime() {
if (this.time) {
clearInterval(this.time)
this.time = null
}
}
async destroy() {
this.clearTime()
this.stopRecorderManager();
await Utils.delayTime(1000);
this.wsClose();
this.resultText = '';
this.resultTextTemp = '';
this.count = 0;
this.initFrameBuffer = null;
await Utils.delayTime(1000);
}
}
......
......@@ -229,6 +229,7 @@ var a = (function () {
(f.port.onmessage = function (t) {
var r = t.data,
o = r.frameBuffer,
vol = r.vol,
n = r.isLastFrame;
if (f.port.__blobUrl) {
window.URL.revokeObjectURL(f.port.__blobUrl);
......@@ -238,6 +239,7 @@ var a = (function () {
if (null == o ? void 0 : o.byteLength)
for (var a = 0; a < o.byteLength; )
e.onFrameRecorded({
vol,
isLastFrame: n && a + s >= o.byteLength,
frameBuffer: t.data.frameBuffer.slice(a, a + s),
}),
......
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