omnirtc-web 1.1.4 → 1.1.5

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.
@@ -7833,7 +7833,7 @@ _stream.addTrack(track.track);context=getAudioContext();source=context.createMed
7833
7833
  */function getAudioBuffer(source,cacheOnlineFile){return __awaiter$1(this,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee87(){var arrayBuffer,cacheAudioBuffer,getFileArrayBuffer,audioBuffer;return regenerator.wrap(function _callee87$(_context87){while(1)switch(_context87.prev=_context87.next){case 0:if(!('string'==typeof source)){_context87.next=15;break;}cacheAudioBuffer=cacheMap.get(source);if(!cacheAudioBuffer){_context87.next=4;break;}return _context87.abrupt("return",cacheAudioBuffer);case 4:_context87.prev=4;_context87.next=7;return getStringArrayBuffer(source);case 7:arrayBuffer=_context87.sent;_context87.next=13;break;case 10:_context87.prev=10;_context87.t0=_context87["catch"](4);throw new CoreRTCError(CoreRTCErrorCode.CHECK_VIDEO_TRACK_ERROR,typeof _context87.t0==='string'?_context87.t0:'fetch audio file failed');case 13:_context87.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);});_context87.next=18;return getFileArrayBuffer;case 18:arrayBuffer=_context87.sent;case 19:_context87.next=21;return decodeAudioData(arrayBuffer);case 21:audioBuffer=_context87.sent;if('string'==typeof source&&cacheOnlineFile)cacheMap.set(source,audioBuffer);return _context87.abrupt("return",audioBuffer);case 24:case"end":return _context87.stop();}},_callee87,null,[[4,10]]);}));}
7834
7834
 
7835
7835
  var StaticConfig = {
7836
- agentVersion: "OmniRTC_Web_V1.1.4",
7836
+ agentVersion: "OmniRTC_Web_V1.1.5",
7837
7837
  logVersion: 1,
7838
7838
  serviceType: 320,
7839
7839
  logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
@@ -12858,13 +12858,8 @@ var VolcCoreRTC = /** @class */ (function () {
12858
12858
  if (config.mode && config.mode === 'rtc') {
12859
12859
  this._engine.setUserVisibility(true);
12860
12860
  }
12861
- if (config.role) {
12862
- if (config.role === 'host') {
12863
- this._engine.setUserVisibility(true);
12864
- }
12865
- else {
12866
- this._engine.setUserVisibility(false);
12867
- }
12861
+ if (config.role && config.role === 'host') {
12862
+ this._engine.setUserVisibility(true);
12868
12863
  }
12869
12864
  if (config.clientRoleOptions) {
12870
12865
  console.log('Currently we do not support setting clientRoleOptions !');
@@ -14106,6 +14101,7 @@ var VolcCoreRTCWrapper = /** @class */ (function () {
14106
14101
  this._plan = plan;
14107
14102
  index.setParameter('STATS_SCALLBACK_SUPPORT', false);
14108
14103
  this._engine = index.createEngine(this._appId);
14104
+ this._engine.setUserVisibility(false);
14109
14105
  VolcCoreRTC$1.setEngine(this._engine);
14110
14106
  VolcCoreRTC$1.setUserInfo({
14111
14107
  appId: appId,
@@ -7839,7 +7839,7 @@
7839
7839
  */function getAudioBuffer(source,cacheOnlineFile){return __awaiter$1(this,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee87(){var arrayBuffer,cacheAudioBuffer,getFileArrayBuffer,audioBuffer;return regenerator.wrap(function _callee87$(_context87){while(1)switch(_context87.prev=_context87.next){case 0:if(!('string'==typeof source)){_context87.next=15;break;}cacheAudioBuffer=cacheMap.get(source);if(!cacheAudioBuffer){_context87.next=4;break;}return _context87.abrupt("return",cacheAudioBuffer);case 4:_context87.prev=4;_context87.next=7;return getStringArrayBuffer(source);case 7:arrayBuffer=_context87.sent;_context87.next=13;break;case 10:_context87.prev=10;_context87.t0=_context87["catch"](4);throw new CoreRTCError(CoreRTCErrorCode.CHECK_VIDEO_TRACK_ERROR,typeof _context87.t0==='string'?_context87.t0:'fetch audio file failed');case 13:_context87.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);});_context87.next=18;return getFileArrayBuffer;case 18:arrayBuffer=_context87.sent;case 19:_context87.next=21;return decodeAudioData(arrayBuffer);case 21:audioBuffer=_context87.sent;if('string'==typeof source&&cacheOnlineFile)cacheMap.set(source,audioBuffer);return _context87.abrupt("return",audioBuffer);case 24:case"end":return _context87.stop();}},_callee87,null,[[4,10]]);}));}
7840
7840
 
7841
7841
  var StaticConfig = {
7842
- agentVersion: "OmniRTC_Web_V1.1.4",
7842
+ agentVersion: "OmniRTC_Web_V1.1.5",
7843
7843
  logVersion: 1,
7844
7844
  serviceType: 320,
7845
7845
  logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
@@ -12864,13 +12864,8 @@
12864
12864
  if (config.mode && config.mode === 'rtc') {
12865
12865
  this._engine.setUserVisibility(true);
12866
12866
  }
12867
- if (config.role) {
12868
- if (config.role === 'host') {
12869
- this._engine.setUserVisibility(true);
12870
- }
12871
- else {
12872
- this._engine.setUserVisibility(false);
12873
- }
12867
+ if (config.role && config.role === 'host') {
12868
+ this._engine.setUserVisibility(true);
12874
12869
  }
12875
12870
  if (config.clientRoleOptions) {
12876
12871
  console.log('Currently we do not support setting clientRoleOptions !');
@@ -14112,6 +14107,7 @@
14112
14107
  this._plan = plan;
14113
14108
  index.setParameter('STATS_SCALLBACK_SUPPORT', false);
14114
14109
  this._engine = index.createEngine(this._appId);
14110
+ this._engine.setUserVisibility(false);
14115
14111
  VolcCoreRTC$1.setEngine(this._engine);
14116
14112
  VolcCoreRTC$1.setUserInfo({
14117
14113
  appId: appId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnirtc-web",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "",
5
5
  "main": "./dist/es-omnirtc-web.js",
6
6
  "types": "./dist/omni.d.ts",