zby-live-sdk 1.0.49-beta20230302 → 1.0.49-beta20230324
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/CHANGELOG.md +17 -2
- package/dist/zby-live-sdk.cjs.js +3 -3
- package/dist/zby-live-sdk.esm.js +3 -3
- package/dist/zby-live-sdk.umd.js +3 -4
- package/package.json +1 -1
- package/src/channel/pomelo/index.js +2 -2
- package/src/channel/pomelo/polemo.js +2 -1
- package/src/config/config.js +1 -1
- package/src/network/dataReport.js +7 -0
- package/src/notice.js +14 -0
- package/src/zby-av-sdk/zego-sdk.js +33 -0
package/package.json
CHANGED
|
@@ -21,8 +21,8 @@ const pomeloObj = {
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
this.log('channel_log : start joining pomelo ......');
|
|
24
|
-
const { userId, roomId, chatUrl, userName, role, institutionId, guid} = args;
|
|
25
|
-
const _args = { userId, roomId, host: chatUrl, userName, institutionId, guid, role: polemoUtil.translateRole(role) };
|
|
24
|
+
const { userId, roomId, chatUrl, userName, role, institutionId, guid, orgId} = args;
|
|
25
|
+
const _args = { userId, roomId, host: chatUrl, userName, institutionId, guid, role: polemoUtil.translateRole(role), orgId};
|
|
26
26
|
this.log(`joinRoom: args: ${JSON.stringify(_args)}`);
|
|
27
27
|
this.initParams = _args;
|
|
28
28
|
// 定时检查发送消息列表
|
|
@@ -628,7 +628,8 @@ class PomeloClient {
|
|
|
628
628
|
role: channelInfo.role,
|
|
629
629
|
classid: channelInfo.roomId,
|
|
630
630
|
protocolVersion: '1.0',
|
|
631
|
-
uniqId: channelInfo.guid
|
|
631
|
+
uniqId: channelInfo.guid,
|
|
632
|
+
orgId: channelInfo.orgId
|
|
632
633
|
};
|
|
633
634
|
|
|
634
635
|
return new Promise(async (resolve, reject) => {
|
package/src/config/config.js
CHANGED
package/src/notice.js
CHANGED
|
@@ -168,6 +168,20 @@ export default {
|
|
|
168
168
|
data
|
|
169
169
|
});
|
|
170
170
|
},
|
|
171
|
+
// SDK自动重试推流成功
|
|
172
|
+
retryPushFlowSuccess(data) {
|
|
173
|
+
notice({
|
|
174
|
+
type:'retryPushFlowSuccess',
|
|
175
|
+
data
|
|
176
|
+
});
|
|
177
|
+
},
|
|
178
|
+
// SDK自动重试拉流成功
|
|
179
|
+
retryPullFlowSuccess(data) {
|
|
180
|
+
notice({
|
|
181
|
+
type:'retryPullFlowSuccess',
|
|
182
|
+
data
|
|
183
|
+
});
|
|
184
|
+
},
|
|
171
185
|
pullFlowResult(data) {
|
|
172
186
|
notice({
|
|
173
187
|
type:'pullFlowResult',
|
|
@@ -272,6 +272,39 @@ const addListener = (userId, userName, confId, nNetType, devices) => {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
break;
|
|
275
|
+
case 'OnStreamEvent':
|
|
276
|
+
{
|
|
277
|
+
let res = JSON.parse(data);
|
|
278
|
+
let keys = Object.keys(res);
|
|
279
|
+
if (keys.indexOf('event') > -1) {
|
|
280
|
+
switch (res.event) {
|
|
281
|
+
case 104:
|
|
282
|
+
try {
|
|
283
|
+
NOTICE.retryPushFlowSuccess({code:0,publish_streamid: _data.pszStreamID});
|
|
284
|
+
} catch (e) {};
|
|
285
|
+
break;
|
|
286
|
+
case 204:
|
|
287
|
+
try {
|
|
288
|
+
NOTICE.retryPullFlowSuccess({code:0,publish_streamid: _data.pszStreamID});
|
|
289
|
+
} catch (e) {};
|
|
290
|
+
break;
|
|
291
|
+
default:
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
// 103开始重试推流, 104重试推流成功,105重试推流失败,203开始重试拉流,204重试拉流成功,205重试拉流失败
|
|
295
|
+
try {
|
|
296
|
+
let ReportArgs = {};
|
|
297
|
+
ReportArgs.streamevent = res.event;
|
|
298
|
+
if(_data.pszStreamID.split('_').length == 5 ){
|
|
299
|
+
ReportArgs.streamid = _data.pszStreamID;
|
|
300
|
+
}
|
|
301
|
+
dataReport.streamEvent({
|
|
302
|
+
code: '0',
|
|
303
|
+
...ReportArgs
|
|
304
|
+
});
|
|
305
|
+
} catch (e) {};
|
|
306
|
+
}
|
|
307
|
+
}
|
|
275
308
|
case 'OnPublishQualityUpdate':
|
|
276
309
|
if (_data.hasOwnProperty('pq') && (_data.pszStreamID).split('_').length != 5) {
|
|
277
310
|
// 主辅两路质量回调,丢包延时只上抛一次,过滤掉辅路数据
|