aliyun-rtc-sdk 7.2.0-beta.0 → 7.2.0-beta.1
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/aliyun-rtc-sdk.es.js +12 -11
- package/dist/aliyun-rtc-sdk.umd.js +4 -4
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3339,7 +3339,7 @@ var Da = { default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShort
|
|
|
3339
3339
|
}, Do = function(r) {
|
|
3340
3340
|
return (String(r).match(To) || [""]).pop().replace(Co, "").replace(/GMT\+0000/g, "UTC");
|
|
3341
3341
|
}, Ci = ((r) => (r.prod = "rs.rtn.aliyuncs.com", r.pre = "prs.rtn.aliyuncs.com", r))(Ci || {});
|
|
3342
|
-
const xi = "7.2.0-beta.
|
|
3342
|
+
const xi = "7.2.0-beta.1";
|
|
3343
3343
|
class De {
|
|
3344
3344
|
static getVersionNumber() {
|
|
3345
3345
|
let s = xi.split("."), e = "";
|
|
@@ -6362,7 +6362,7 @@ const Ne = (Ie = class extends je {
|
|
|
6362
6362
|
})(20, 100);
|
|
6363
6363
|
return _.then(() => {
|
|
6364
6364
|
f && this.slsReporter.reportSubscribeFirstPacket(t === ve.Resume, i, a, u, { fprt: f - h, ifsprtc: y ? y - h : 0, ajsub: t === ve.Join ? 1 : 0, pctid: this.pcTraceId, subtid: (d == null ? void 0 : d.traceId) || "", sstc: b - h }), y && this.slsReporter.reportSubscribeFirstFrame(t === ve.Resume, i, a, u, { fvfrt: y - h, fp2fftc: y - f, ajsub: t === ve.Join ? 1 : 0, tffrtc: t === ve.Join ? y - this.localJoinTime : y - n, pctid: this.pcTraceId, subtid: (d == null ? void 0 : d.traceId) || "", fvfdtc: y - h }), g && (this.slsReporter.reportConnectionLatencyEvent(at.FIRST_REMOTE, dt.DECODED, i, k.Audio, g), this.slsReporter.reportSubscribeFirstPacket(t === ve.Resume, i, a, k.Audio, { fprt: g - h, ifsprtc: g - h, ajsub: t === ve.Join ? 1 : 0, pctid: this.pcTraceId, subtid: (d == null ? void 0 : d.traceId) || "", sstc: b - h }));
|
|
6365
|
-
}), d.isHTTP = o, d.statsCheckPromise = _, d;
|
|
6365
|
+
}), d && (d.isHTTP = o, d.statsCheckPromise = _), d;
|
|
6366
6366
|
});
|
|
6367
6367
|
}
|
|
6368
6368
|
getSubscribeVideoStats(e, t) {
|
|
@@ -6617,7 +6617,7 @@ const ct = (Lt = class extends je {
|
|
|
6617
6617
|
})), this.screenStreamInfo.on("videotrackended", () => E(this, null, function* () {
|
|
6618
6618
|
yield this.stopLocalStream({ screen: !0 }), this.emit("trackended", Jt.ScreenTrackEnded);
|
|
6619
6619
|
})), this.pluginManager.on("added", (i) => E(this, null, function* () {
|
|
6620
|
-
if (O.info(`[${Lt.logName}]`, "plugin added", i.name), !i.isSupported("7.2.0-beta.
|
|
6620
|
+
if (O.info(`[${Lt.logName}]`, "plugin added", i.name), !i.isSupported("7.2.0-beta.1"))
|
|
6621
6621
|
return console.warn(`${i.name} is not supported!!!`), void i.emit("unsupported");
|
|
6622
6622
|
try {
|
|
6623
6623
|
yield i.init();
|
|
@@ -7489,7 +7489,7 @@ var Mi = ((r) => (r[r.Default = 0] = "Default", r[r.Human = 1] = "Human", r[r.Ro
|
|
|
7489
7489
|
return t && a && vc(s, e, a), a;
|
|
7490
7490
|
}, Nt;
|
|
7491
7491
|
const br = (Nt = class extends je {
|
|
7492
|
-
constructor(e) {
|
|
7492
|
+
constructor(e, t) {
|
|
7493
7493
|
super();
|
|
7494
7494
|
m(this, "self");
|
|
7495
7495
|
m(this, "remoteUser");
|
|
@@ -7499,8 +7499,9 @@ const br = (Nt = class extends je {
|
|
|
7499
7499
|
m(this, "readyMsgSuccess", !1);
|
|
7500
7500
|
m(this, "sendReadyMsgTimer");
|
|
7501
7501
|
m(this, "startReadyMsgTime");
|
|
7502
|
+
m(this, "robotUserId");
|
|
7502
7503
|
m(this, "onSubscribeDataChannel", (e) => {
|
|
7503
|
-
!this.remoteUser && e && (this.hasSubDataChannel = !0, this.remoteUser = e, this.remoteUser.on("remoteDataChannelMessage", this.onCheckReadyMsg), this.trySendReadyMsg());
|
|
7504
|
+
!this.remoteUser && e && (this.robotUserId && this.robotUserId !== e.userId || (this.hasSubDataChannel = !0, this.remoteUser = e, this.remoteUser.on("remoteDataChannelMessage", this.onCheckReadyMsg), this.trySendReadyMsg()));
|
|
7504
7505
|
});
|
|
7505
7506
|
m(this, "onCheckReadyMsg", (e, t) => {
|
|
7506
7507
|
var i, a;
|
|
@@ -7514,7 +7515,7 @@ const br = (Nt = class extends je {
|
|
|
7514
7515
|
m(this, "onDataPublishStateChange", (e, t) => {
|
|
7515
7516
|
t === Z.AliRtcStatePublished && (this.hasPubDataChannel = !0, this.trySendReadyMsg());
|
|
7516
7517
|
});
|
|
7517
|
-
this.self = e, this.self.on("dataPublishStateChanged", this.onDataPublishStateChange);
|
|
7518
|
+
this.self = e, this.self.on("dataPublishStateChanged", this.onDataPublishStateChange), this.robotUserId = t;
|
|
7518
7519
|
}
|
|
7519
7520
|
destroy() {
|
|
7520
7521
|
this.self.off("dataPublishStateChanged", this.onDataPublishStateChange), window.clearTimeout(this.sendReadyMsgTimer), this.remoteUser = void 0, this.sendReadyMsg = !1, this.hasPubDataChannel = !1, this.hasSubDataChannel = !1, this.readyMsgSuccess = !1, this.startReadyMsgTime = 0;
|
|
@@ -7867,7 +7868,7 @@ class Ge extends je {
|
|
|
7867
7868
|
}
|
|
7868
7869
|
init(e, t, i) {
|
|
7869
7870
|
var a;
|
|
7870
|
-
this.authInfo = e, this.self.enableAudioVolumeIndication(this.audioVolumeIndicationInterval), this.self.initInfo(e, t.pushstreamurl), this.audio3AConfig.useAudio3AConfigFromServer && this.audio3AConfig.loadFromServerConfig((a = t == null ? void 0 : t.config) == null ? void 0 : a.data), this.setupAudioProcessingPluginIfNeeded(), i.capabilityProfile === Mi.Human && (this.dcReadyHelper = new Rc(this.self), this.dcReadyHelper.on("dcready", (n) => {
|
|
7871
|
+
this.authInfo = e, this.self.enableAudioVolumeIndication(this.audioVolumeIndicationInterval), this.self.initInfo(e, t.pushstreamurl), this.audio3AConfig.useAudio3AConfigFromServer && this.audio3AConfig.loadFromServerConfig((a = t == null ? void 0 : t.config) == null ? void 0 : a.data), this.setupAudioProcessingPluginIfNeeded(), i.capabilityProfile === Mi.Human && (this.dcReadyHelper = new Rc(this.self, i.robotUserId), this.dcReadyHelper.on("dcready", (n) => {
|
|
7871
7872
|
var o;
|
|
7872
7873
|
this.emit("remoteUserSubscribedDataChannel", n), (o = this.dcReadyHelper) == null || o.destroy(), this.dcReadyHelper = void 0;
|
|
7873
7874
|
})), this.setTimeoutToUpdateAllStreamUrls(t.pushstreamurl), t.users.forEach((n) => {
|
|
@@ -8820,7 +8821,7 @@ class Dc {
|
|
|
8820
8821
|
get adaptInfo() {
|
|
8821
8822
|
var e, t, i, a;
|
|
8822
8823
|
let s = new Pc.UAParser().getResult();
|
|
8823
|
-
return { os_name: ((e = s.os.name) == null ? void 0 : e.replace(" ", "")) + "_" + ((t = s.browser.name) == null ? void 0 : t.replace(" ", "")), device_name: ((i = s.device.model) == null ? void 0 : i.replace(" ", "")) || "", brand_name: ((a = s.device.vendor) == null ? void 0 : a.replace(" ", "")) || "", device_key: window.navigator.userAgent, os_version: s.browser.version || "", sdk_version: "7.2.0-beta.
|
|
8824
|
+
return { os_name: ((e = s.os.name) == null ? void 0 : e.replace(" ", "")) + "_" + ((t = s.browser.name) == null ? void 0 : t.replace(" ", "")), device_name: ((i = s.device.model) == null ? void 0 : i.replace(" ", "")) || "", brand_name: ((a = s.device.vendor) == null ? void 0 : a.replace(" ", "")) || "", device_key: window.navigator.userAgent, os_version: s.browser.version || "", sdk_version: "7.2.0-beta.1", version: "v1" };
|
|
8824
8825
|
}
|
|
8825
8826
|
refreshAuthInfo(s) {
|
|
8826
8827
|
this.authInfo = s;
|
|
@@ -8922,7 +8923,7 @@ const st = class st extends je {
|
|
|
8922
8923
|
let a = this.packageCreater.createPublishPackage();
|
|
8923
8924
|
a.data.users = [], a.data.l1ip = t, i.subscribe.signal = this.wsClient.connectUrl;
|
|
8924
8925
|
const { tracks: n, resume: o } = i;
|
|
8925
|
-
let c = "7.2.0-beta.
|
|
8926
|
+
let c = "7.2.0-beta.1";
|
|
8926
8927
|
c && (c = c.split("-")[0]), n.forEach((d) => {
|
|
8927
8928
|
const { codec: h, ssrc: b } = d;
|
|
8928
8929
|
d.userdata = JSON.stringify({ sdk_version: c, codec: h }), d.ssrc = `${b}`, o && (d.attr = { reason: "reconnect" });
|
|
@@ -9771,7 +9772,7 @@ const F = (W = class extends je {
|
|
|
9771
9772
|
this.bizControl.rtsManager.on("disconnected", () => E(this, null, function* () {
|
|
9772
9773
|
O.event(`[${W.logName}]`, "RTS Disconnected"), (yield De.isNetworkAvailable()) ? this.onNetworkRecovery() : this.onNetworkError();
|
|
9773
9774
|
})), this.bizControl.rtsManager.on("subscribeexceeds", () => E(this, null, function* () {
|
|
9774
|
-
yield this.resumePublishForNetworkRecovery(), yield this.resumeSubList();
|
|
9775
|
+
O.event(`[${W.logName}]`, "RTS SubscribeExceeds"), this.bizControl.rtsManager.clear(), yield this.resumePublishForNetworkRecovery(), yield this.resumeSubList();
|
|
9775
9776
|
})), this.bizControl.rtsManager.on("seimessage", (e, t, i) => {
|
|
9776
9777
|
const a = this.remoteUsers.find((n) => n.streamUrl === e);
|
|
9777
9778
|
a && this.emit("mediaExtensionMsgReceived", a.userId, i, t);
|
|
@@ -10070,7 +10071,7 @@ const F = (W = class extends je {
|
|
|
10070
10071
|
const f = Date.now(), y = yield this.signalingManager.join(c, l, this.maxSignalingReconnectDuration, d, i);
|
|
10071
10072
|
y.l1ip ? (O.info("allocate l1 pub ip with mode", p, y.l1ip), this.bizControl.rtsManager.preferredPubL1Ip = y.l1ip) : this.bizControl.rtsManager.preferredPubL1Ip = void 0, y.l1subip ? (O.info("allocate l1 sub ip with mode", p, y.l1subip), this.bizControl.rtsManager.preferredSubL1Ip = y.l1subip) : this.bizControl.rtsManager.preferredSubL1Ip = void 0;
|
|
10072
10073
|
const _ = Date.now();
|
|
10073
|
-
this.connectState = oe.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", oe.AliRtcConnectionStatusConnected, At.AliRtcConnectionSignalingJoinRoomSuccess), this.bizControl.init(c, y, { capabilityProfile: typeof t == "object" ? t.capabilityProfile : Mi.Default }), this.setCheckAuthInfoTimer(c.timestamp, y.timestamp), this.liveTranscoding.setAuthInfo(c), this.slsReporter.reportJoin(0, d, y.tid), this.slsReporter.reportJoinResult(null), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, dt.SEND_SIG, "", "", f), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, dt.RECV_RST, "", "", _), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, dt.END, "", "");
|
|
10074
|
+
this.connectState = oe.AliRtcConnectionStatusConnected, this.emit("connectionStatusChange", oe.AliRtcConnectionStatusConnected, At.AliRtcConnectionSignalingJoinRoomSuccess), this.bizControl.init(c, y, { capabilityProfile: typeof t == "object" ? t.capabilityProfile : Mi.Default, robotUserId: typeof t == "object" ? t.robotUserId : void 0 }), this.setCheckAuthInfoTimer(c.timestamp, y.timestamp), this.liveTranscoding.setAuthInfo(c), this.slsReporter.reportJoin(0, d, y.tid), this.slsReporter.reportJoinResult(null), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, dt.SEND_SIG, "", "", f), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, dt.RECV_RST, "", "", _), this.slsReporter.reportConnectionLatencyEvent(at.JOIN, dt.END, "", "");
|
|
10074
10075
|
} catch (p) {
|
|
10075
10076
|
const g = (S = p.code) != null ? S : -1, f = p.reason || p.message || "";
|
|
10076
10077
|
throw this.connectState = oe.AliRtcConnectionStatusDisconnected, this.emit("connectionStatusChange", oe.AliRtcConnectionStatusDisconnected, At.AliRtcConnectionSignalingJoinRoomFailure), this.slsReporter.reportJoin(g, d, ""), this.slsReporter.reportJoinResult(p), new V(g, f);
|