omnirtc-web 1.7.1 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aigc.js +6 -6
- package/dist/es-aigc.js +6 -6
- package/dist/es-omnirtc-web.js +6 -6
- package/dist/omnirtc-web.js +6 -6
- package/package.json +1 -1
package/dist/aigc.js
CHANGED
|
@@ -6973,7 +6973,7 @@
|
|
|
6973
6973
|
* @returns
|
|
6974
6974
|
*/
|
|
6975
6975
|
Aigc.prototype.query = function () {
|
|
6976
|
-
return this.request.get('/
|
|
6976
|
+
return this.request.get('/config?appId=' + this.config.engineConfig.adaptAppId);
|
|
6977
6977
|
};
|
|
6978
6978
|
Aigc.prototype.start = function (taskType, config, robotId, options) {
|
|
6979
6979
|
var _a;
|
|
@@ -6984,7 +6984,7 @@
|
|
|
6984
6984
|
this.taskType = taskType;
|
|
6985
6985
|
var ts = Date.now().toString();
|
|
6986
6986
|
var data = __assign((_a = { appId: this.config.engineConfig.adaptAppId, room: this.config.roomStr, user: String(this.config.user), robotId: robotId, taskId: this.taskId, taskType: taskType }, _a[taskType === 'visionchat' ? 'vision' : taskType] = config, _a.ts = ts, _a), options);
|
|
6987
|
-
return this.request.post('/
|
|
6987
|
+
return this.request.post('/start', data, {
|
|
6988
6988
|
headers: {
|
|
6989
6989
|
'X-Auth-TimeStamp': ts,
|
|
6990
6990
|
}
|
|
@@ -7000,7 +7000,7 @@
|
|
|
7000
7000
|
var data = __assign({ appId: this.config.engineConfig.adaptAppId, taskId: this.taskId, taskType: this.taskType, ts: ts }, options);
|
|
7001
7001
|
this.taskId = undefined;
|
|
7002
7002
|
this.taskType = undefined;
|
|
7003
|
-
return this.request.post('/
|
|
7003
|
+
return this.request.post('/stop', data, {
|
|
7004
7004
|
headers: {
|
|
7005
7005
|
'X-Auth-TimeStamp': ts,
|
|
7006
7006
|
}
|
|
@@ -7008,7 +7008,7 @@
|
|
|
7008
7008
|
};
|
|
7009
7009
|
Aigc.prototype.update = function (type, config, options) {
|
|
7010
7010
|
var data = __assign({ appId: this.config.engineConfig.adaptAppId, taskId: this.taskId, type: type, data: config }, options);
|
|
7011
|
-
return this.request.post('/
|
|
7011
|
+
return this.request.post('/update', data);
|
|
7012
7012
|
};
|
|
7013
7013
|
/**
|
|
7014
7014
|
* 绑定事件触发器
|
|
@@ -7043,8 +7043,8 @@
|
|
|
7043
7043
|
}
|
|
7044
7044
|
return taskId;
|
|
7045
7045
|
};
|
|
7046
|
-
Aigc.BASE_URL_TEST = 'https://api2.xueersi.com/rtcapi2stage';
|
|
7047
|
-
Aigc.BASE_URL = 'https://api2.xueersi.com/rtcapi2';
|
|
7046
|
+
Aigc.BASE_URL_TEST = 'https://api2.xueersi.com/rtcapi2stage/api/aigc';
|
|
7047
|
+
Aigc.BASE_URL = 'https://api2.xueersi.com/rtcapi2/api/aigc';
|
|
7048
7048
|
Aigc.DICTIONARY = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
7049
7049
|
Aigc.UUID = 'd327b12049ac3bfb09925af9ea3b21f9';
|
|
7050
7050
|
return Aigc;
|
package/dist/es-aigc.js
CHANGED
|
@@ -6969,7 +6969,7 @@ var Aigc = /** @class */ (function (_super) {
|
|
|
6969
6969
|
* @returns
|
|
6970
6970
|
*/
|
|
6971
6971
|
Aigc.prototype.query = function () {
|
|
6972
|
-
return this.request.get('/
|
|
6972
|
+
return this.request.get('/config?appId=' + this.config.engineConfig.adaptAppId);
|
|
6973
6973
|
};
|
|
6974
6974
|
Aigc.prototype.start = function (taskType, config, robotId, options) {
|
|
6975
6975
|
var _a;
|
|
@@ -6980,7 +6980,7 @@ var Aigc = /** @class */ (function (_super) {
|
|
|
6980
6980
|
this.taskType = taskType;
|
|
6981
6981
|
var ts = Date.now().toString();
|
|
6982
6982
|
var data = __assign((_a = { appId: this.config.engineConfig.adaptAppId, room: this.config.roomStr, user: String(this.config.user), robotId: robotId, taskId: this.taskId, taskType: taskType }, _a[taskType === 'visionchat' ? 'vision' : taskType] = config, _a.ts = ts, _a), options);
|
|
6983
|
-
return this.request.post('/
|
|
6983
|
+
return this.request.post('/start', data, {
|
|
6984
6984
|
headers: {
|
|
6985
6985
|
'X-Auth-TimeStamp': ts,
|
|
6986
6986
|
}
|
|
@@ -6996,7 +6996,7 @@ var Aigc = /** @class */ (function (_super) {
|
|
|
6996
6996
|
var data = __assign({ appId: this.config.engineConfig.adaptAppId, taskId: this.taskId, taskType: this.taskType, ts: ts }, options);
|
|
6997
6997
|
this.taskId = undefined;
|
|
6998
6998
|
this.taskType = undefined;
|
|
6999
|
-
return this.request.post('/
|
|
6999
|
+
return this.request.post('/stop', data, {
|
|
7000
7000
|
headers: {
|
|
7001
7001
|
'X-Auth-TimeStamp': ts,
|
|
7002
7002
|
}
|
|
@@ -7004,7 +7004,7 @@ var Aigc = /** @class */ (function (_super) {
|
|
|
7004
7004
|
};
|
|
7005
7005
|
Aigc.prototype.update = function (type, config, options) {
|
|
7006
7006
|
var data = __assign({ appId: this.config.engineConfig.adaptAppId, taskId: this.taskId, type: type, data: config }, options);
|
|
7007
|
-
return this.request.post('/
|
|
7007
|
+
return this.request.post('/update', data);
|
|
7008
7008
|
};
|
|
7009
7009
|
/**
|
|
7010
7010
|
* 绑定事件触发器
|
|
@@ -7039,8 +7039,8 @@ var Aigc = /** @class */ (function (_super) {
|
|
|
7039
7039
|
}
|
|
7040
7040
|
return taskId;
|
|
7041
7041
|
};
|
|
7042
|
-
Aigc.BASE_URL_TEST = 'https://api2.xueersi.com/rtcapi2stage';
|
|
7043
|
-
Aigc.BASE_URL = 'https://api2.xueersi.com/rtcapi2';
|
|
7042
|
+
Aigc.BASE_URL_TEST = 'https://api2.xueersi.com/rtcapi2stage/api/aigc';
|
|
7043
|
+
Aigc.BASE_URL = 'https://api2.xueersi.com/rtcapi2/api/aigc';
|
|
7044
7044
|
Aigc.DICTIONARY = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
7045
7045
|
Aigc.UUID = 'd327b12049ac3bfb09925af9ea3b21f9';
|
|
7046
7046
|
return Aigc;
|
package/dist/es-omnirtc-web.js
CHANGED
|
@@ -5432,7 +5432,7 @@ _stream.addTrack(track.track);context=getAudioContext();source=context.createMed
|
|
|
5432
5432
|
*/function getAudioBuffer(source,cacheOnlineFile){return __awaiter$1(this,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee228(){var arrayBuffer,cacheAudioBuffer,getFileArrayBuffer,audioBuffer;return regenerator.wrap(function _callee228$(_context243){while(1)switch(_context243.prev=_context243.next){case 0:if(!('string'==typeof source)){_context243.next=15;break;}cacheAudioBuffer=cacheMap.get(source);if(!cacheAudioBuffer){_context243.next=4;break;}return _context243.abrupt("return",cacheAudioBuffer);case 4:_context243.prev=4;_context243.next=7;return getStringArrayBuffer(source);case 7:arrayBuffer=_context243.sent;_context243.next=13;break;case 10:_context243.prev=10;_context243.t0=_context243["catch"](4);throw new CoreRTCError(CoreRTCErrorCode.CHECK_VIDEO_TRACK_ERROR,typeof _context243.t0==='string'?_context243.t0:'fetch audio file failed');case 13:_context243.next=19;break;case 15:getFileArrayBuffer=new Promise(function(resolve,reject){var fileReader=new FileReader();fileReader.addEventListener('load',function(res){if(res.target){resolve(res.target.result);}else {reject(new CoreRTCError(CoreRTCErrorCode.READ_LOCAL_AUDIO_FILE_ERROR,'read local audio file error'));}});fileReader.addEventListener('error',function(){reject(new CoreRTCError(CoreRTCErrorCode.READ_LOCAL_AUDIO_FILE_ERROR,'read local audio file error'));});fileReader.readAsArrayBuffer(source);});_context243.next=18;return getFileArrayBuffer;case 18:arrayBuffer=_context243.sent;case 19:_context243.next=21;return decodeAudioData(arrayBuffer);case 21:audioBuffer=_context243.sent;if('string'==typeof source&&cacheOnlineFile)cacheMap.set(source,audioBuffer);return _context243.abrupt("return",audioBuffer);case 24:case"end":return _context243.stop();}},_callee228,null,[[4,10]]);}));}
|
|
5433
5433
|
|
|
5434
5434
|
var StaticConfig = {
|
|
5435
|
-
agentVersion: "OmniRTC_Web_V1.7.
|
|
5435
|
+
agentVersion: "OmniRTC_Web_V1.7.3",
|
|
5436
5436
|
logVersion: 1,
|
|
5437
5437
|
serviceType: 320,
|
|
5438
5438
|
logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
|
|
@@ -5859,6 +5859,7 @@ var StatisticDynamicHelper = /** @class */ (function (_super) {
|
|
|
5859
5859
|
videoDelay: _stats.end2EndDelay,
|
|
5860
5860
|
videoLost: _stats.packetLossRate,
|
|
5861
5861
|
videoDecFps: _stats.decodeFrameRate,
|
|
5862
|
+
latency: _stats.end2EndDelay || 0,
|
|
5862
5863
|
};
|
|
5863
5864
|
this.remoteVideoStatsMap.get(uid).push(stats);
|
|
5864
5865
|
var lastStats = this.lastRemoteVideoStatsMap.get(uid);
|
|
@@ -5894,6 +5895,7 @@ var StatisticDynamicHelper = /** @class */ (function (_super) {
|
|
|
5894
5895
|
audioBps: _stats.receiveBitrate / 1000 >> 0,
|
|
5895
5896
|
audioVolume: audioVolume * 255 >> 0,
|
|
5896
5897
|
audioDecFps: 0,
|
|
5898
|
+
latency: _stats.end2EndDelay || 0,
|
|
5897
5899
|
};
|
|
5898
5900
|
this_1.remoteAudioStatsMap.get(uid).push(stats);
|
|
5899
5901
|
var lastStats = this_1.lastRemoteAudioStatsMap.get(uid);
|
|
@@ -5981,9 +5983,8 @@ var StatisticDynamicHelper = /** @class */ (function (_super) {
|
|
|
5981
5983
|
try {
|
|
5982
5984
|
for (_a = (e_1 = void 0, __values(this.remoteAudioStatsMap)), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
5983
5985
|
_c = __read(_b.value, 2), senderId = _c[0], audioArray = _c[1];
|
|
5984
|
-
remoteAudioStats = calculateAvg(audioArray, ['audioDelay', 'audioLost', 'audioBps', 'audioVolume', 'audioDecFps']);
|
|
5986
|
+
remoteAudioStats = calculateAvg(audioArray, ['audioDelay', 'audioLost', 'audioBps', 'audioVolume', 'audioDecFps', 'latency']);
|
|
5985
5987
|
remoteAudioStats.hbDur = STATISTICE_INTERVAL_SEC * 1000;
|
|
5986
|
-
remoteAudioStats.latency = 0;
|
|
5987
5988
|
remoteAudioStats.audioDecFps = 0;
|
|
5988
5989
|
remoteAudioStats.isSubscribeAudio = 1;
|
|
5989
5990
|
avgStatsMap.set(senderId, remoteAudioStats);
|
|
@@ -5999,9 +6000,8 @@ var StatisticDynamicHelper = /** @class */ (function (_super) {
|
|
|
5999
6000
|
try {
|
|
6000
6001
|
for (_d = (e_2 = void 0, __values(this.remoteVideoStatsMap)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
6001
6002
|
_f = __read(_e.value, 2), senderId = _f[0], videoArray = _f[1];
|
|
6002
|
-
remoteVideoStats = calculateAvg(videoArray, ['videoFps', 'videoBps', 'videoDelay', 'videoLost', 'videoDecFps']);
|
|
6003
|
+
remoteVideoStats = calculateAvg(videoArray, ['videoFps', 'videoBps', 'videoDelay', 'videoLost', 'videoDecFps', 'latency']);
|
|
6003
6004
|
remoteVideoStats.hbDur = STATISTICE_INTERVAL_SEC * 1000;
|
|
6004
|
-
remoteVideoStats.latency = 0;
|
|
6005
6005
|
remoteVideoStats.videoDecFps = remoteVideoStats.videoFps;
|
|
6006
6006
|
remoteVideoStats.isSubscribeVideo = 1;
|
|
6007
6007
|
remoteVideoStats.videoWidth = videoArray[0].videoWidth;
|
|
@@ -8363,7 +8363,7 @@ function log(clsName) {
|
|
|
8363
8363
|
sdk_api_name: '中间层-函数调用',
|
|
8364
8364
|
message: "\u4E2D\u95F4\u5C42-".concat(clsName, ".").concat(name),
|
|
8365
8365
|
from_encapsulation_layer: true,
|
|
8366
|
-
encapsulation_layer_built_timestamp: '2026/
|
|
8366
|
+
encapsulation_layer_built_timestamp: '2026/8/21 15:20:18',
|
|
8367
8367
|
});
|
|
8368
8368
|
}
|
|
8369
8369
|
}
|
package/dist/omnirtc-web.js
CHANGED
|
@@ -5440,7 +5440,7 @@
|
|
|
5440
5440
|
*/function getAudioBuffer(source,cacheOnlineFile){return __awaiter$1(this,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee228(){var arrayBuffer,cacheAudioBuffer,getFileArrayBuffer,audioBuffer;return regenerator.wrap(function _callee228$(_context243){while(1)switch(_context243.prev=_context243.next){case 0:if(!('string'==typeof source)){_context243.next=15;break;}cacheAudioBuffer=cacheMap.get(source);if(!cacheAudioBuffer){_context243.next=4;break;}return _context243.abrupt("return",cacheAudioBuffer);case 4:_context243.prev=4;_context243.next=7;return getStringArrayBuffer(source);case 7:arrayBuffer=_context243.sent;_context243.next=13;break;case 10:_context243.prev=10;_context243.t0=_context243["catch"](4);throw new CoreRTCError(CoreRTCErrorCode.CHECK_VIDEO_TRACK_ERROR,typeof _context243.t0==='string'?_context243.t0:'fetch audio file failed');case 13:_context243.next=19;break;case 15:getFileArrayBuffer=new Promise(function(resolve,reject){var fileReader=new FileReader();fileReader.addEventListener('load',function(res){if(res.target){resolve(res.target.result);}else {reject(new CoreRTCError(CoreRTCErrorCode.READ_LOCAL_AUDIO_FILE_ERROR,'read local audio file error'));}});fileReader.addEventListener('error',function(){reject(new CoreRTCError(CoreRTCErrorCode.READ_LOCAL_AUDIO_FILE_ERROR,'read local audio file error'));});fileReader.readAsArrayBuffer(source);});_context243.next=18;return getFileArrayBuffer;case 18:arrayBuffer=_context243.sent;case 19:_context243.next=21;return decodeAudioData(arrayBuffer);case 21:audioBuffer=_context243.sent;if('string'==typeof source&&cacheOnlineFile)cacheMap.set(source,audioBuffer);return _context243.abrupt("return",audioBuffer);case 24:case"end":return _context243.stop();}},_callee228,null,[[4,10]]);}));}
|
|
5441
5441
|
|
|
5442
5442
|
var StaticConfig = {
|
|
5443
|
-
agentVersion: "OmniRTC_Web_V1.7.
|
|
5443
|
+
agentVersion: "OmniRTC_Web_V1.7.3",
|
|
5444
5444
|
logVersion: 1,
|
|
5445
5445
|
serviceType: 320,
|
|
5446
5446
|
logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
|
|
@@ -5867,6 +5867,7 @@
|
|
|
5867
5867
|
videoDelay: _stats.end2EndDelay,
|
|
5868
5868
|
videoLost: _stats.packetLossRate,
|
|
5869
5869
|
videoDecFps: _stats.decodeFrameRate,
|
|
5870
|
+
latency: _stats.end2EndDelay || 0,
|
|
5870
5871
|
};
|
|
5871
5872
|
this.remoteVideoStatsMap.get(uid).push(stats);
|
|
5872
5873
|
var lastStats = this.lastRemoteVideoStatsMap.get(uid);
|
|
@@ -5902,6 +5903,7 @@
|
|
|
5902
5903
|
audioBps: _stats.receiveBitrate / 1000 >> 0,
|
|
5903
5904
|
audioVolume: audioVolume * 255 >> 0,
|
|
5904
5905
|
audioDecFps: 0,
|
|
5906
|
+
latency: _stats.end2EndDelay || 0,
|
|
5905
5907
|
};
|
|
5906
5908
|
this_1.remoteAudioStatsMap.get(uid).push(stats);
|
|
5907
5909
|
var lastStats = this_1.lastRemoteAudioStatsMap.get(uid);
|
|
@@ -5989,9 +5991,8 @@
|
|
|
5989
5991
|
try {
|
|
5990
5992
|
for (_a = (e_1 = void 0, __values(this.remoteAudioStatsMap)), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
5991
5993
|
_c = __read(_b.value, 2), senderId = _c[0], audioArray = _c[1];
|
|
5992
|
-
remoteAudioStats = calculateAvg(audioArray, ['audioDelay', 'audioLost', 'audioBps', 'audioVolume', 'audioDecFps']);
|
|
5994
|
+
remoteAudioStats = calculateAvg(audioArray, ['audioDelay', 'audioLost', 'audioBps', 'audioVolume', 'audioDecFps', 'latency']);
|
|
5993
5995
|
remoteAudioStats.hbDur = STATISTICE_INTERVAL_SEC * 1000;
|
|
5994
|
-
remoteAudioStats.latency = 0;
|
|
5995
5996
|
remoteAudioStats.audioDecFps = 0;
|
|
5996
5997
|
remoteAudioStats.isSubscribeAudio = 1;
|
|
5997
5998
|
avgStatsMap.set(senderId, remoteAudioStats);
|
|
@@ -6007,9 +6008,8 @@
|
|
|
6007
6008
|
try {
|
|
6008
6009
|
for (_d = (e_2 = void 0, __values(this.remoteVideoStatsMap)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
6009
6010
|
_f = __read(_e.value, 2), senderId = _f[0], videoArray = _f[1];
|
|
6010
|
-
remoteVideoStats = calculateAvg(videoArray, ['videoFps', 'videoBps', 'videoDelay', 'videoLost', 'videoDecFps']);
|
|
6011
|
+
remoteVideoStats = calculateAvg(videoArray, ['videoFps', 'videoBps', 'videoDelay', 'videoLost', 'videoDecFps', 'latency']);
|
|
6011
6012
|
remoteVideoStats.hbDur = STATISTICE_INTERVAL_SEC * 1000;
|
|
6012
|
-
remoteVideoStats.latency = 0;
|
|
6013
6013
|
remoteVideoStats.videoDecFps = remoteVideoStats.videoFps;
|
|
6014
6014
|
remoteVideoStats.isSubscribeVideo = 1;
|
|
6015
6015
|
remoteVideoStats.videoWidth = videoArray[0].videoWidth;
|
|
@@ -8371,7 +8371,7 @@
|
|
|
8371
8371
|
sdk_api_name: '中间层-函数调用',
|
|
8372
8372
|
message: "\u4E2D\u95F4\u5C42-".concat(clsName, ".").concat(name),
|
|
8373
8373
|
from_encapsulation_layer: true,
|
|
8374
|
-
encapsulation_layer_built_timestamp: '2026/
|
|
8374
|
+
encapsulation_layer_built_timestamp: '2026/8/21 15:20:18',
|
|
8375
8375
|
});
|
|
8376
8376
|
}
|
|
8377
8377
|
}
|