@realsee/live 0.5.2-dev.2 → 0.5.2-dev.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/realsee-live.cjs.development.js +17 -17
- package/dist/realsee-live.cjs.development.js.map +1 -1
- package/dist/realsee-live.cjs.production.js +1 -1
- package/dist/realsee-live.cjs.production.js.map +1 -1
- package/dist/realsee-live.esm.js +17 -17
- package/dist/realsee-live.esm.js.map +1 -1
- package/dist/realsee-live.umd.development.js +17 -17
- package/dist/realsee-live.umd.development.js.map +1 -1
- package/dist/realsee-live.umd.production.js +1 -1
- package/dist/realsee-live.umd.production.js.map +1 -1
- package/package.json +1 -1
|
@@ -51505,7 +51505,7 @@
|
|
|
51505
51505
|
* @param liveMsg
|
|
51506
51506
|
*/
|
|
51507
51507
|
this._handleMessage = (liveMsg) => __awaiter$10(this, void 0, void 0, function* () {
|
|
51508
|
-
var _b, _c, _d, _e, _f
|
|
51508
|
+
var _b, _c, _d, _e, _f;
|
|
51509
51509
|
if (typeof liveMsg === 'object') {
|
|
51510
51510
|
const { command, data = {}, frontRequestId, code, message } = liveMsg;
|
|
51511
51511
|
if (code === 'SUCCESS') {
|
|
@@ -51545,7 +51545,7 @@
|
|
|
51545
51545
|
}));
|
|
51546
51546
|
if (result) {
|
|
51547
51547
|
const status = (_f = this._options.initialMicroStatus) !== null && _f !== void 0 ? _f : exports.MicroStatus.OPEN;
|
|
51548
|
-
yield
|
|
51548
|
+
yield this.toggleMicro(status === exports.MicroStatus.OPEN);
|
|
51549
51549
|
}
|
|
51550
51550
|
else {
|
|
51551
51551
|
logger$1.error('加入语音房间失败');
|
|
@@ -51659,12 +51659,12 @@
|
|
|
51659
51659
|
* @returns
|
|
51660
51660
|
*/
|
|
51661
51661
|
this.connect = (options = {}) => __awaiter$10(this, void 0, void 0, function* () {
|
|
51662
|
-
var _h, _j, _k
|
|
51662
|
+
var _g, _h, _j, _k;
|
|
51663
51663
|
// 检查 url 和 票据获取接口实现
|
|
51664
|
-
this._options.url = (
|
|
51665
|
-
this._options.getTicket = (
|
|
51664
|
+
this._options.url = (_h = (_g = options.url) !== null && _g !== void 0 ? _g : this._options.url) !== null && _h !== void 0 ? _h : '';
|
|
51665
|
+
this._options.getTicket = (_j = options.getTicket) !== null && _j !== void 0 ? _j : this._options.getTicket;
|
|
51666
51666
|
this._options.initialMicroStatus =
|
|
51667
|
-
(
|
|
51667
|
+
(_k = options.rtcMicStatus) !== null && _k !== void 0 ? _k : this._options.initialMicroStatus;
|
|
51668
51668
|
if (!/^ws(s):\/\//.test(this._options.url) ||
|
|
51669
51669
|
typeof this._options.getTicket !== 'function') {
|
|
51670
51670
|
if (!/^ws(s):\/\//.test(this._options.url)) {
|
|
@@ -51713,11 +51713,11 @@
|
|
|
51713
51713
|
* @returns
|
|
51714
51714
|
*/
|
|
51715
51715
|
this.exit = () => __awaiter$10(this, void 0, void 0, function* () {
|
|
51716
|
-
var
|
|
51716
|
+
var _l;
|
|
51717
51717
|
this._clearLiveData();
|
|
51718
51718
|
try {
|
|
51719
51719
|
/** 退出强制关闭语音 */
|
|
51720
|
-
(
|
|
51720
|
+
(_l = this.$RTC) === null || _l === void 0 ? void 0 : _l.quit();
|
|
51721
51721
|
yield this.updateStatus(exports.BuiltinEventType.RoomChange, exports.BuiltinActionType.RoomClose, {});
|
|
51722
51722
|
}
|
|
51723
51723
|
catch (e) {
|
|
@@ -51744,10 +51744,10 @@
|
|
|
51744
51744
|
});
|
|
51745
51745
|
// 仅用于用户自己的麦克风控制
|
|
51746
51746
|
this.toggleMicro = (microStatus) => __awaiter$10(this, void 0, void 0, function* () {
|
|
51747
|
-
var _o, _p
|
|
51748
|
-
if (!((
|
|
51747
|
+
var _m, _o, _p;
|
|
51748
|
+
if (!((_o = (_m = this.selfInfo) === null || _m === void 0 ? void 0 : _m.permission) === null || _o === void 0 ? void 0 : _o.control_own_micro))
|
|
51749
51749
|
return false;
|
|
51750
|
-
const result = yield ((
|
|
51750
|
+
const result = yield ((_p = this.$RTC) === null || _p === void 0 ? void 0 : _p.toggleMicro(microStatus));
|
|
51751
51751
|
if (result) {
|
|
51752
51752
|
yield this.updateStatus(exports.BuiltinEventType.UserChange, exports.BuiltinActionType.UserMicroStatus, {
|
|
51753
51753
|
status: microStatus ? exports.MicroStatus.OPEN : exports.MicroStatus.CLOSE,
|
|
@@ -51762,12 +51762,12 @@
|
|
|
51762
51762
|
* @returns
|
|
51763
51763
|
*/
|
|
51764
51764
|
this.forbidMicro = (microStatus, toUserIds) => __awaiter$10(this, void 0, void 0, function* () {
|
|
51765
|
-
var
|
|
51765
|
+
var _q, _r;
|
|
51766
51766
|
if (typeof this._options.canForbidUserMicro === 'function' &&
|
|
51767
51767
|
!this._options.canForbidUserMicro(toUserIds)) {
|
|
51768
51768
|
return false;
|
|
51769
51769
|
}
|
|
51770
|
-
if (!((
|
|
51770
|
+
if (!((_r = (_q = this.selfInfo) === null || _q === void 0 ? void 0 : _q.permission) === null || _r === void 0 ? void 0 : _r.control_other_micro)) {
|
|
51771
51771
|
return false;
|
|
51772
51772
|
}
|
|
51773
51773
|
return yield this.updateStatus(exports.BuiltinEventType.UserChange, exports.BuiltinActionType.UserMicroStatus, {
|
|
@@ -51781,12 +51781,12 @@
|
|
|
51781
51781
|
* @returns
|
|
51782
51782
|
*/
|
|
51783
51783
|
this.forbidSync = (sync, toUserIds) => __awaiter$10(this, void 0, void 0, function* () {
|
|
51784
|
-
var
|
|
51784
|
+
var _s, _t;
|
|
51785
51785
|
if (typeof this._options.canForbidUserSync === 'function' &&
|
|
51786
51786
|
!this._options.canForbidUserSync(toUserIds)) {
|
|
51787
51787
|
return false;
|
|
51788
51788
|
}
|
|
51789
|
-
if (!((
|
|
51789
|
+
if (!((_t = (_s = this.selfInfo) === null || _s === void 0 ? void 0 : _s.permission) === null || _t === void 0 ? void 0 : _t.control_other_sync)) {
|
|
51790
51790
|
return false;
|
|
51791
51791
|
}
|
|
51792
51792
|
return yield this.updateStatus(exports.BuiltinEventType.UserChange, exports.BuiltinActionType.UserPermission, { sync_frame: sync }, toUserIds);
|
|
@@ -51797,12 +51797,12 @@
|
|
|
51797
51797
|
* @returns
|
|
51798
51798
|
*/
|
|
51799
51799
|
this.kick = (toUserIds) => __awaiter$10(this, void 0, void 0, function* () {
|
|
51800
|
-
var
|
|
51800
|
+
var _u, _v;
|
|
51801
51801
|
if (typeof this._options.canForbidUserKick === 'function' &&
|
|
51802
51802
|
!this._options.canForbidUserKick(toUserIds)) {
|
|
51803
51803
|
return false;
|
|
51804
51804
|
}
|
|
51805
|
-
if (!((
|
|
51805
|
+
if (!((_v = (_u = this.selfInfo) === null || _u === void 0 ? void 0 : _u.permission) === null || _v === void 0 ? void 0 : _v.change_other_status)) {
|
|
51806
51806
|
return false;
|
|
51807
51807
|
}
|
|
51808
51808
|
return yield this.updateStatus(exports.BuiltinEventType.UserChange, exports.BuiltinActionType.UserStatus, {
|