omnirtc-web 1.7.2 → 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.
@@ -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.2",
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/6/10 17:54:45',
8366
+ encapsulation_layer_built_timestamp: '2026/8/21 15:20:18',
8367
8367
  });
8368
8368
  }
8369
8369
  }
@@ -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.2",
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/6/10 17:54:45',
8374
+ encapsulation_layer_built_timestamp: '2026/8/21 15:20:18',
8375
8375
  });
8376
8376
  }
8377
8377
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnirtc-web",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "",
5
5
  "main": "./dist/es-omnirtc-web.js",
6
6
  "module": "./dist/es-omnirtc-web.js",