omnirtc-web 0.1.0-beta.6 → 0.1.0-beta.7
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/es-omnirtc-web.js +171 -150
- package/package.json +1 -1
package/dist/es-omnirtc-web.js
CHANGED
|
@@ -97,7 +97,7 @@ var InvalidTokenError_1 = InvalidTokenError;
|
|
|
97
97
|
lib.InvalidTokenError = InvalidTokenError_1;
|
|
98
98
|
|
|
99
99
|
var StaticConfig = {
|
|
100
|
-
agentVersion: "OmniRTC_Web_V0.1.0-beta.
|
|
100
|
+
agentVersion: "OmniRTC_Web_V0.1.0-beta.7",
|
|
101
101
|
logVersion: 1,
|
|
102
102
|
serviceType: 320,
|
|
103
103
|
logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
|
|
@@ -8412,9 +8412,8 @@ function log$2(clsName) {
|
|
|
8412
8412
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8413
8413
|
arg[_i] = arguments[_i];
|
|
8414
8414
|
}
|
|
8415
|
-
var reportArgs = arg.filter(function (a) { return typeof a !== 'function'; });
|
|
8416
8415
|
if (volcCommonStatus.turnOnConsoleLogs) {
|
|
8417
|
-
console[volcCommonStatus.debugLogLevel]
|
|
8416
|
+
// console[volcCommonStatus.debugLogLevel](`%c 中间层 ==> ${clsName}.${name}()`, 'color:red', ...reportArgs);
|
|
8418
8417
|
// @ts-ignore
|
|
8419
8418
|
if (index._monitor) {
|
|
8420
8419
|
// @ts-ignore
|
|
@@ -8491,16 +8490,16 @@ var VolcLocalAudioTrackStatsManager = /** @class */ (function () {
|
|
|
8491
8490
|
return stats;
|
|
8492
8491
|
};
|
|
8493
8492
|
__decorate([
|
|
8494
|
-
log$2(
|
|
8493
|
+
log$2()
|
|
8495
8494
|
], VolcLocalAudioTrackStatsManager.prototype, "_onLocalStreamStats", null);
|
|
8496
8495
|
__decorate([
|
|
8497
|
-
log$2(
|
|
8496
|
+
log$2()
|
|
8498
8497
|
], VolcLocalAudioTrackStatsManager.prototype, "startPublish", null);
|
|
8499
8498
|
__decorate([
|
|
8500
|
-
log$2(
|
|
8499
|
+
log$2()
|
|
8501
8500
|
], VolcLocalAudioTrackStatsManager.prototype, "stopPublish", null);
|
|
8502
8501
|
__decorate([
|
|
8503
|
-
log$2(
|
|
8502
|
+
log$2()
|
|
8504
8503
|
], VolcLocalAudioTrackStatsManager.prototype, "getStats", null);
|
|
8505
8504
|
return VolcLocalAudioTrackStatsManager;
|
|
8506
8505
|
}());
|
|
@@ -8612,16 +8611,16 @@ var VolcLocalVideoTrackStatsManager = /** @class */ (function () {
|
|
|
8612
8611
|
return stats;
|
|
8613
8612
|
};
|
|
8614
8613
|
__decorate([
|
|
8615
|
-
log$2(
|
|
8614
|
+
log$2()
|
|
8616
8615
|
], VolcLocalVideoTrackStatsManager.prototype, "_onLocalStreamStats", null);
|
|
8617
8616
|
__decorate([
|
|
8618
|
-
log$2(
|
|
8617
|
+
log$2()
|
|
8619
8618
|
], VolcLocalVideoTrackStatsManager.prototype, "startPublish", null);
|
|
8620
8619
|
__decorate([
|
|
8621
|
-
log$2(
|
|
8620
|
+
log$2()
|
|
8622
8621
|
], VolcLocalVideoTrackStatsManager.prototype, "stopPublish", null);
|
|
8623
8622
|
__decorate([
|
|
8624
|
-
log$2(
|
|
8623
|
+
log$2()
|
|
8625
8624
|
], VolcLocalVideoTrackStatsManager.prototype, "getStats", null);
|
|
8626
8625
|
return VolcLocalVideoTrackStatsManager;
|
|
8627
8626
|
}());
|
|
@@ -8759,19 +8758,19 @@ var VolcRemoteAudioTrackStatsManager = /** @class */ (function () {
|
|
|
8759
8758
|
return stats;
|
|
8760
8759
|
};
|
|
8761
8760
|
__decorate([
|
|
8762
|
-
log$2(
|
|
8761
|
+
log$2()
|
|
8763
8762
|
], VolcRemoteAudioTrackStatsManager.prototype, "startSubscribe", null);
|
|
8764
8763
|
__decorate([
|
|
8765
|
-
log$2(
|
|
8764
|
+
log$2()
|
|
8766
8765
|
], VolcRemoteAudioTrackStatsManager.prototype, "stopSubscribe", null);
|
|
8767
8766
|
__decorate([
|
|
8768
|
-
log$2(
|
|
8767
|
+
log$2()
|
|
8769
8768
|
], VolcRemoteAudioTrackStatsManager.prototype, "_onStreamStats", null);
|
|
8770
8769
|
__decorate([
|
|
8771
|
-
log$2(
|
|
8770
|
+
log$2()
|
|
8772
8771
|
], VolcRemoteAudioTrackStatsManager.prototype, "getStats", null);
|
|
8773
8772
|
__decorate([
|
|
8774
|
-
log$2(
|
|
8773
|
+
log$2()
|
|
8775
8774
|
], VolcRemoteAudioTrackStatsManager.prototype, "getUserStats", null);
|
|
8776
8775
|
return VolcRemoteAudioTrackStatsManager;
|
|
8777
8776
|
}());
|
|
@@ -8919,19 +8918,19 @@ var VolcRemoteVideoTrackStatsManager = /** @class */ (function () {
|
|
|
8919
8918
|
return stats;
|
|
8920
8919
|
};
|
|
8921
8920
|
__decorate([
|
|
8922
|
-
log$2(
|
|
8921
|
+
log$2()
|
|
8923
8922
|
], VolcRemoteVideoTrackStatsManager.prototype, "startSubscribe", null);
|
|
8924
8923
|
__decorate([
|
|
8925
|
-
log$2(
|
|
8924
|
+
log$2()
|
|
8926
8925
|
], VolcRemoteVideoTrackStatsManager.prototype, "stopSubscribe", null);
|
|
8927
8926
|
__decorate([
|
|
8928
|
-
log$2(
|
|
8927
|
+
log$2()
|
|
8929
8928
|
], VolcRemoteVideoTrackStatsManager.prototype, "_onStreamStats", null);
|
|
8930
8929
|
__decorate([
|
|
8931
|
-
log$2(
|
|
8930
|
+
log$2()
|
|
8932
8931
|
], VolcRemoteVideoTrackStatsManager.prototype, "getStats", null);
|
|
8933
8932
|
__decorate([
|
|
8934
|
-
log$2(
|
|
8933
|
+
log$2()
|
|
8935
8934
|
], VolcRemoteVideoTrackStatsManager.prototype, "getUserStats", null);
|
|
8936
8935
|
return VolcRemoteVideoTrackStatsManager;
|
|
8937
8936
|
}());
|
|
@@ -9013,7 +9012,7 @@ var VolcCoreRTCStatsManager = /** @class */ (function () {
|
|
|
9013
9012
|
return stats;
|
|
9014
9013
|
};
|
|
9015
9014
|
__decorate([
|
|
9016
|
-
log$2(
|
|
9015
|
+
log$2()
|
|
9017
9016
|
], VolcCoreRTCStatsManager.prototype, "getStats", null);
|
|
9018
9017
|
return VolcCoreRTCStatsManager;
|
|
9019
9018
|
}());
|
|
@@ -9047,16 +9046,16 @@ var MediaStatsManager = /** @class */ (function () {
|
|
|
9047
9046
|
});
|
|
9048
9047
|
};
|
|
9049
9048
|
__decorate([
|
|
9050
|
-
log$2(
|
|
9049
|
+
log$2()
|
|
9051
9050
|
], MediaStatsManager.prototype, "init", null);
|
|
9052
9051
|
__decorate([
|
|
9053
|
-
log$2(
|
|
9052
|
+
log$2()
|
|
9054
9053
|
], MediaStatsManager.prototype, "dispose", null);
|
|
9055
9054
|
__decorate([
|
|
9056
|
-
log$2(
|
|
9055
|
+
log$2()
|
|
9057
9056
|
], MediaStatsManager.prototype, "onJoinRoom", null);
|
|
9058
9057
|
__decorate([
|
|
9059
|
-
log$2(
|
|
9058
|
+
log$2()
|
|
9060
9059
|
], MediaStatsManager.prototype, "getCoreRTCStats", null);
|
|
9061
9060
|
return MediaStatsManager;
|
|
9062
9061
|
}());
|
|
@@ -9328,37 +9327,37 @@ var VolcTrack = /** @class */ (function () {
|
|
|
9328
9327
|
this._eventEmitter.emit(event);
|
|
9329
9328
|
};
|
|
9330
9329
|
__decorate([
|
|
9331
|
-
log$2(
|
|
9330
|
+
log$2()
|
|
9332
9331
|
], VolcTrack.prototype, "getTrackId", null);
|
|
9333
9332
|
__decorate([
|
|
9334
|
-
log$2(
|
|
9333
|
+
log$2()
|
|
9335
9334
|
], VolcTrack.prototype, "getMediaStreamTrack", null);
|
|
9336
9335
|
__decorate([
|
|
9337
|
-
log$2(
|
|
9336
|
+
log$2()
|
|
9338
9337
|
], VolcTrack.prototype, "stop", null);
|
|
9339
9338
|
__decorate([
|
|
9340
|
-
log$2(
|
|
9339
|
+
log$2()
|
|
9341
9340
|
], VolcTrack.prototype, "play", null);
|
|
9342
9341
|
__decorate([
|
|
9343
|
-
log$2(
|
|
9342
|
+
log$2()
|
|
9344
9343
|
], VolcTrack.prototype, "getListeners", null);
|
|
9345
9344
|
__decorate([
|
|
9346
|
-
log$2(
|
|
9345
|
+
log$2()
|
|
9347
9346
|
], VolcTrack.prototype, "on", null);
|
|
9348
9347
|
__decorate([
|
|
9349
|
-
log$2(
|
|
9348
|
+
log$2()
|
|
9350
9349
|
], VolcTrack.prototype, "once", null);
|
|
9351
9350
|
__decorate([
|
|
9352
|
-
log$2(
|
|
9351
|
+
log$2()
|
|
9353
9352
|
], VolcTrack.prototype, "off", null);
|
|
9354
9353
|
__decorate([
|
|
9355
|
-
log$2(
|
|
9354
|
+
log$2()
|
|
9356
9355
|
], VolcTrack.prototype, "listenerCount", null);
|
|
9357
9356
|
__decorate([
|
|
9358
|
-
log$2(
|
|
9357
|
+
log$2()
|
|
9359
9358
|
], VolcTrack.prototype, "removeAllListeners", null);
|
|
9360
9359
|
__decorate([
|
|
9361
|
-
log$2(
|
|
9360
|
+
log$2()
|
|
9362
9361
|
], VolcTrack.prototype, "emit", null);
|
|
9363
9362
|
return VolcTrack;
|
|
9364
9363
|
}());
|
|
@@ -9398,6 +9397,7 @@ var VolcLocalTrack = /** @class */ (function (_super) {
|
|
|
9398
9397
|
};
|
|
9399
9398
|
VolcLocalTrack.prototype.trackEndEmitter = function () {
|
|
9400
9399
|
this.emit('track-ended');
|
|
9400
|
+
this._stopPublishingWhenTrackEnded();
|
|
9401
9401
|
};
|
|
9402
9402
|
Object.defineProperty(VolcLocalTrack.prototype, "track", {
|
|
9403
9403
|
get: function () {
|
|
@@ -9622,6 +9622,29 @@ var VolcLocalTrack = /** @class */ (function (_super) {
|
|
|
9622
9622
|
});
|
|
9623
9623
|
});
|
|
9624
9624
|
};
|
|
9625
|
+
VolcLocalTrack.prototype._stopPublishingWhenTrackEnded = function () {
|
|
9626
|
+
var _a, _b;
|
|
9627
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
9628
|
+
var mediaType;
|
|
9629
|
+
return __generator(this, function (_c) {
|
|
9630
|
+
switch (_c.label) {
|
|
9631
|
+
case 0:
|
|
9632
|
+
mediaType = this._getVolcMediaType();
|
|
9633
|
+
if (!(volcCommonStatus.hasJoinRoom && mediaType)) return [3 /*break*/, 4];
|
|
9634
|
+
if (!this.isScreen) return [3 /*break*/, 2];
|
|
9635
|
+
return [4 /*yield*/, ((_a = this._engine) === null || _a === void 0 ? void 0 : _a.unpublishScreen(mediaType))];
|
|
9636
|
+
case 1:
|
|
9637
|
+
_c.sent();
|
|
9638
|
+
return [3 /*break*/, 4];
|
|
9639
|
+
case 2: return [4 /*yield*/, ((_b = this._engine) === null || _b === void 0 ? void 0 : _b.unpublishStream(mediaType))];
|
|
9640
|
+
case 3:
|
|
9641
|
+
_c.sent();
|
|
9642
|
+
_c.label = 4;
|
|
9643
|
+
case 4: return [2 /*return*/];
|
|
9644
|
+
}
|
|
9645
|
+
});
|
|
9646
|
+
});
|
|
9647
|
+
};
|
|
9625
9648
|
VolcLocalTrack.prototype._updateTrack = function () {
|
|
9626
9649
|
var _a, _b;
|
|
9627
9650
|
if (this.isScreen) {
|
|
@@ -9752,61 +9775,64 @@ var VolcLocalTrack = /** @class */ (function (_super) {
|
|
|
9752
9775
|
});
|
|
9753
9776
|
};
|
|
9754
9777
|
__decorate([
|
|
9755
|
-
log$2(
|
|
9778
|
+
log$2()
|
|
9756
9779
|
], VolcLocalTrack.prototype, "getUserId", null);
|
|
9757
9780
|
__decorate([
|
|
9758
|
-
log$2(
|
|
9781
|
+
log$2()
|
|
9759
9782
|
], VolcLocalTrack.prototype, "setUserId", null);
|
|
9760
9783
|
__decorate([
|
|
9761
|
-
log$2(
|
|
9784
|
+
log$2()
|
|
9762
9785
|
], VolcLocalTrack.prototype, "trackEndEmitter", null);
|
|
9763
9786
|
__decorate([
|
|
9764
|
-
log$2(
|
|
9787
|
+
log$2()
|
|
9765
9788
|
], VolcLocalTrack.prototype, "setTrack", null);
|
|
9766
9789
|
__decorate([
|
|
9767
|
-
log$2(
|
|
9790
|
+
log$2()
|
|
9768
9791
|
], VolcLocalTrack.prototype, "_bindingEvents", null);
|
|
9769
9792
|
__decorate([
|
|
9770
|
-
log$2(
|
|
9793
|
+
log$2()
|
|
9771
9794
|
], VolcLocalTrack.prototype, "_unbindingEvents", null);
|
|
9772
9795
|
__decorate([
|
|
9773
|
-
log$2(
|
|
9796
|
+
log$2()
|
|
9774
9797
|
], VolcLocalTrack.prototype, "getTrackLabel", null);
|
|
9775
9798
|
__decorate([
|
|
9776
|
-
log$2(
|
|
9799
|
+
log$2()
|
|
9777
9800
|
], VolcLocalTrack.prototype, "_startCapturing", null);
|
|
9778
9801
|
__decorate([
|
|
9779
|
-
log$2(
|
|
9802
|
+
log$2()
|
|
9780
9803
|
], VolcLocalTrack.prototype, "_stopCapturing", null);
|
|
9781
9804
|
__decorate([
|
|
9782
|
-
log$2(
|
|
9805
|
+
log$2()
|
|
9783
9806
|
], VolcLocalTrack.prototype, "_startScreenCapturing", null);
|
|
9784
9807
|
__decorate([
|
|
9785
|
-
log$2(
|
|
9808
|
+
log$2()
|
|
9786
9809
|
], VolcLocalTrack.prototype, "_stopScreenCapturing", null);
|
|
9787
9810
|
__decorate([
|
|
9788
|
-
log$2(
|
|
9811
|
+
log$2()
|
|
9789
9812
|
], VolcLocalTrack.prototype, "setEnabled", null);
|
|
9790
9813
|
__decorate([
|
|
9791
|
-
log$2(
|
|
9814
|
+
log$2()
|
|
9792
9815
|
], VolcLocalTrack.prototype, "_checkStatus", null);
|
|
9793
9816
|
__decorate([
|
|
9794
|
-
log$2(
|
|
9817
|
+
log$2()
|
|
9795
9818
|
], VolcLocalTrack.prototype, "_checkStatusForMain", null);
|
|
9796
9819
|
__decorate([
|
|
9797
|
-
log$2(
|
|
9820
|
+
log$2()
|
|
9821
|
+
], VolcLocalTrack.prototype, "_stopPublishingWhenTrackEnded", null);
|
|
9822
|
+
__decorate([
|
|
9823
|
+
log$2()
|
|
9798
9824
|
], VolcLocalTrack.prototype, "_updateTrack", null);
|
|
9799
9825
|
__decorate([
|
|
9800
|
-
log$2(
|
|
9826
|
+
log$2()
|
|
9801
9827
|
], VolcLocalTrack.prototype, "_checkStatusForScreen", null);
|
|
9802
9828
|
__decorate([
|
|
9803
|
-
log$2(
|
|
9829
|
+
log$2()
|
|
9804
9830
|
], VolcLocalTrack.prototype, "setMuted", null);
|
|
9805
9831
|
__decorate([
|
|
9806
|
-
log$2(
|
|
9832
|
+
log$2()
|
|
9807
9833
|
], VolcLocalTrack.prototype, "_getVolcMediaType", null);
|
|
9808
9834
|
__decorate([
|
|
9809
|
-
log$2(
|
|
9835
|
+
log$2()
|
|
9810
9836
|
], VolcLocalTrack.prototype, "close", null);
|
|
9811
9837
|
return VolcLocalTrack;
|
|
9812
9838
|
}(VolcTrack));
|
|
@@ -9881,25 +9907,25 @@ var VolcRemoteTrack = /** @class */ (function (_super) {
|
|
|
9881
9907
|
}
|
|
9882
9908
|
};
|
|
9883
9909
|
__decorate([
|
|
9884
|
-
log$2(
|
|
9910
|
+
log$2()
|
|
9885
9911
|
], VolcRemoteTrack.prototype, "setTrack", null);
|
|
9886
9912
|
__decorate([
|
|
9887
|
-
log$2(
|
|
9913
|
+
log$2()
|
|
9888
9914
|
], VolcRemoteTrack.prototype, "setUserId", null);
|
|
9889
9915
|
__decorate([
|
|
9890
|
-
log$2(
|
|
9916
|
+
log$2()
|
|
9891
9917
|
], VolcRemoteTrack.prototype, "getUserId", null);
|
|
9892
9918
|
__decorate([
|
|
9893
|
-
log$2(
|
|
9919
|
+
log$2()
|
|
9894
9920
|
], VolcRemoteTrack.prototype, "firstVideoFrameDecodedEmitter", null);
|
|
9895
9921
|
__decorate([
|
|
9896
|
-
log$2(
|
|
9922
|
+
log$2()
|
|
9897
9923
|
], VolcRemoteTrack.prototype, "firstAudioFrameDecodedEmitter", null);
|
|
9898
9924
|
__decorate([
|
|
9899
|
-
log$2(
|
|
9925
|
+
log$2()
|
|
9900
9926
|
], VolcRemoteTrack.prototype, "_bindingEvents", null);
|
|
9901
9927
|
__decorate([
|
|
9902
|
-
log$2(
|
|
9928
|
+
log$2()
|
|
9903
9929
|
], VolcRemoteTrack.prototype, "_unbindingEvents", null);
|
|
9904
9930
|
return VolcRemoteTrack;
|
|
9905
9931
|
}(VolcTrack));
|
|
@@ -9941,12 +9967,10 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9941
9967
|
else {
|
|
9942
9968
|
this._engine.setLocalVideoMirrorType(MirrorType.MIRROR_TYPE_NONE);
|
|
9943
9969
|
}
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
});
|
|
9949
|
-
}
|
|
9970
|
+
this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
9971
|
+
renderDom: undefined,
|
|
9972
|
+
renderMode: _getRenderMode(),
|
|
9973
|
+
});
|
|
9950
9974
|
this._domElement = this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
9951
9975
|
renderDom: element,
|
|
9952
9976
|
renderMode: _getRenderMode(),
|
|
@@ -9954,12 +9978,10 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9954
9978
|
this._engine.play(undefined, MediaType.VIDEO, StreamIndex.STREAM_INDEX_MAIN);
|
|
9955
9979
|
}
|
|
9956
9980
|
else {
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
});
|
|
9962
|
-
}
|
|
9981
|
+
this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
9982
|
+
renderDom: undefined,
|
|
9983
|
+
renderMode: _getRenderMode(),
|
|
9984
|
+
});
|
|
9963
9985
|
this._domElement = this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
9964
9986
|
renderDom: element,
|
|
9965
9987
|
renderMode: _getRenderMode(),
|
|
@@ -9971,7 +9993,7 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9971
9993
|
VolcLocalVideoTrack.prototype.getCurrentFrameData = function () {
|
|
9972
9994
|
var width = 100;
|
|
9973
9995
|
var height = 100;
|
|
9974
|
-
if (this._domElement
|
|
9996
|
+
if (this._domElement) {
|
|
9975
9997
|
var canvas = document.createElement('canvas');
|
|
9976
9998
|
var ctx = canvas.getContext('2d');
|
|
9977
9999
|
width = this._domElement.videoWidth;
|
|
@@ -9992,10 +10014,10 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9992
10014
|
return new ImageData(width, height);
|
|
9993
10015
|
};
|
|
9994
10016
|
__decorate([
|
|
9995
|
-
log$2(
|
|
10017
|
+
log$2()
|
|
9996
10018
|
], VolcLocalVideoTrack.prototype, "play", null);
|
|
9997
10019
|
__decorate([
|
|
9998
|
-
log$2(
|
|
10020
|
+
log$2()
|
|
9999
10021
|
], VolcLocalVideoTrack.prototype, "getCurrentFrameData", null);
|
|
10000
10022
|
return VolcLocalVideoTrack;
|
|
10001
10023
|
}(VolcLocalTrack));
|
|
@@ -10043,10 +10065,10 @@ var VolcCameraVideoTrack = /** @class */ (function (_super) {
|
|
|
10043
10065
|
});
|
|
10044
10066
|
};
|
|
10045
10067
|
__decorate([
|
|
10046
|
-
log$2(
|
|
10068
|
+
log$2()
|
|
10047
10069
|
], VolcCameraVideoTrack.prototype, "setDevice", null);
|
|
10048
10070
|
__decorate([
|
|
10049
|
-
log$2(
|
|
10071
|
+
log$2()
|
|
10050
10072
|
], VolcCameraVideoTrack.prototype, "setEncoderConfiguration", null);
|
|
10051
10073
|
return VolcCameraVideoTrack;
|
|
10052
10074
|
}(VolcLocalVideoTrack));
|
|
@@ -10103,16 +10125,16 @@ var VolcLocalAudioTrack = /** @class */ (function (_super) {
|
|
|
10103
10125
|
});
|
|
10104
10126
|
};
|
|
10105
10127
|
__decorate([
|
|
10106
|
-
log$2(
|
|
10128
|
+
log$2()
|
|
10107
10129
|
], VolcLocalAudioTrack.prototype, "setVolume", null);
|
|
10108
10130
|
__decorate([
|
|
10109
|
-
log$2(
|
|
10131
|
+
log$2()
|
|
10110
10132
|
], VolcLocalAudioTrack.prototype, "getVolumeLevel", null);
|
|
10111
10133
|
__decorate([
|
|
10112
|
-
log$2(
|
|
10134
|
+
log$2()
|
|
10113
10135
|
], VolcLocalAudioTrack.prototype, "play", null);
|
|
10114
10136
|
__decorate([
|
|
10115
|
-
log$2(
|
|
10137
|
+
log$2()
|
|
10116
10138
|
], VolcLocalAudioTrack.prototype, "setPlaybackDevice", null);
|
|
10117
10139
|
return VolcLocalAudioTrack;
|
|
10118
10140
|
}(VolcLocalTrack));
|
|
@@ -10133,7 +10155,7 @@ var VolcMicrophoneAudioTrack = /** @class */ (function (_super) {
|
|
|
10133
10155
|
});
|
|
10134
10156
|
};
|
|
10135
10157
|
__decorate([
|
|
10136
|
-
log$2(
|
|
10158
|
+
log$2()
|
|
10137
10159
|
], VolcMicrophoneAudioTrack.prototype, "setDevice", null);
|
|
10138
10160
|
return VolcMicrophoneAudioTrack;
|
|
10139
10161
|
}(VolcLocalAudioTrack));
|
|
@@ -10184,19 +10206,19 @@ var VolcRemoteAudioTrack = /** @class */ (function (_super) {
|
|
|
10184
10206
|
}
|
|
10185
10207
|
};
|
|
10186
10208
|
__decorate([
|
|
10187
|
-
log$2(
|
|
10209
|
+
log$2()
|
|
10188
10210
|
], VolcRemoteAudioTrack.prototype, "setVolume", null);
|
|
10189
10211
|
__decorate([
|
|
10190
|
-
log$2(
|
|
10212
|
+
log$2()
|
|
10191
10213
|
], VolcRemoteAudioTrack.prototype, "getVolumeLevel", null);
|
|
10192
10214
|
__decorate([
|
|
10193
|
-
log$2(
|
|
10215
|
+
log$2()
|
|
10194
10216
|
], VolcRemoteAudioTrack.prototype, "setVolumeLevel", null);
|
|
10195
10217
|
__decorate([
|
|
10196
|
-
log$2(
|
|
10218
|
+
log$2()
|
|
10197
10219
|
], VolcRemoteAudioTrack.prototype, "setPlaybackDevice", null);
|
|
10198
10220
|
__decorate([
|
|
10199
|
-
log$2(
|
|
10221
|
+
log$2()
|
|
10200
10222
|
], VolcRemoteAudioTrack.prototype, "play", null);
|
|
10201
10223
|
return VolcRemoteAudioTrack;
|
|
10202
10224
|
}(VolcRemoteTrack));
|
|
@@ -10261,7 +10283,7 @@ var VolcRemoteVideoTrack = /** @class */ (function (_super) {
|
|
|
10261
10283
|
VolcRemoteVideoTrack.prototype.getCurrentFrameData = function () {
|
|
10262
10284
|
var width = 100;
|
|
10263
10285
|
var height = 100;
|
|
10264
|
-
if (this._domElement
|
|
10286
|
+
if (this._domElement) {
|
|
10265
10287
|
var canvas = document.createElement('canvas');
|
|
10266
10288
|
var ctx = canvas.getContext('2d');
|
|
10267
10289
|
width = this._domElement.videoWidth;
|
|
@@ -10277,10 +10299,10 @@ var VolcRemoteVideoTrack = /** @class */ (function (_super) {
|
|
|
10277
10299
|
return new ImageData(width, height);
|
|
10278
10300
|
};
|
|
10279
10301
|
__decorate([
|
|
10280
|
-
log$2(
|
|
10302
|
+
log$2()
|
|
10281
10303
|
], VolcRemoteVideoTrack.prototype, "play", null);
|
|
10282
10304
|
__decorate([
|
|
10283
|
-
log$2(
|
|
10305
|
+
log$2()
|
|
10284
10306
|
], VolcRemoteVideoTrack.prototype, "getCurrentFrameData", null);
|
|
10285
10307
|
return VolcRemoteVideoTrack;
|
|
10286
10308
|
}(VolcRemoteTrack));
|
|
@@ -10432,8 +10454,9 @@ var VolcClient = /** @class */ (function (_super) {
|
|
|
10432
10454
|
var userId = e.userId, message = e.message;
|
|
10433
10455
|
this.emit('user-info-updated', userId, message);
|
|
10434
10456
|
};
|
|
10457
|
+
// 日志较多
|
|
10458
|
+
// @log('VolcClient')
|
|
10435
10459
|
VolcClient.prototype._handleRemoteAudioPropertiesReport = function (e) {
|
|
10436
|
-
var _this_1 = this;
|
|
10437
10460
|
var mainStreamAudioVolume = e
|
|
10438
10461
|
.filter(function (audioInfo) { return audioInfo.streamKey.streamIndex === StreamIndex.STREAM_INDEX_MAIN; })
|
|
10439
10462
|
.map(function (audioInfo) { return ({
|
|
@@ -10441,8 +10464,9 @@ var VolcClient = /** @class */ (function (_super) {
|
|
|
10441
10464
|
linearVolume: audioInfo.audioPropertiesInfo.linearVolume,
|
|
10442
10465
|
}); });
|
|
10443
10466
|
var _this = this;
|
|
10467
|
+
var volumeArr = [];
|
|
10444
10468
|
mainStreamAudioVolume.forEach(function (item) {
|
|
10445
|
-
|
|
10469
|
+
volumeArr.push({
|
|
10446
10470
|
uid: item.userId,
|
|
10447
10471
|
level: Math.floor((item.linearVolume) / 255 * 100),
|
|
10448
10472
|
});
|
|
@@ -10451,7 +10475,10 @@ var VolcClient = /** @class */ (function (_super) {
|
|
|
10451
10475
|
remoteUser.audioTrack.setVolumeLevel((item.linearVolume) / 255);
|
|
10452
10476
|
}
|
|
10453
10477
|
});
|
|
10478
|
+
this.emit('volume-indicator', volumeArr);
|
|
10454
10479
|
};
|
|
10480
|
+
// 日志较多
|
|
10481
|
+
// @log('VolcClient')
|
|
10455
10482
|
VolcClient.prototype._handleLocalAudioPropertiesReport = function (e) {
|
|
10456
10483
|
var mainStreamAudioVolume = e
|
|
10457
10484
|
.find(function (audioInfo) { return audioInfo.streamIndex === StreamIndex.STREAM_INDEX_MAIN; });
|
|
@@ -11000,82 +11027,76 @@ var VolcClient = /** @class */ (function (_super) {
|
|
|
11000
11027
|
return this._stats.remoteVideo.getStats();
|
|
11001
11028
|
};
|
|
11002
11029
|
__decorate([
|
|
11003
|
-
log$2(
|
|
11030
|
+
log$2()
|
|
11004
11031
|
], VolcClient.prototype, "_addEventListeners", null);
|
|
11005
11032
|
__decorate([
|
|
11006
|
-
log$2(
|
|
11033
|
+
log$2()
|
|
11007
11034
|
], VolcClient.prototype, "_onConnectionStateChange", null);
|
|
11008
11035
|
__decorate([
|
|
11009
|
-
log$2(
|
|
11036
|
+
log$2()
|
|
11010
11037
|
], VolcClient.prototype, "_onRoomMessageReceivedHandler", null);
|
|
11011
11038
|
__decorate([
|
|
11012
|
-
log$2(
|
|
11013
|
-
], VolcClient.prototype, "_handleRemoteAudioPropertiesReport", null);
|
|
11014
|
-
__decorate([
|
|
11015
|
-
log$2('VolcClient')
|
|
11016
|
-
], VolcClient.prototype, "_handleLocalAudioPropertiesReport", null);
|
|
11017
|
-
__decorate([
|
|
11018
|
-
log$2('VolcClient')
|
|
11039
|
+
log$2()
|
|
11019
11040
|
], VolcClient.prototype, "_removeEventListeners", null);
|
|
11020
11041
|
__decorate([
|
|
11021
|
-
log$2(
|
|
11042
|
+
log$2()
|
|
11022
11043
|
], VolcClient.prototype, "_onUserJoinedHandler", null);
|
|
11023
11044
|
__decorate([
|
|
11024
|
-
log$2(
|
|
11045
|
+
log$2()
|
|
11025
11046
|
], VolcClient.prototype, "_onUserLeaveHandler", null);
|
|
11026
11047
|
__decorate([
|
|
11027
|
-
log$2(
|
|
11048
|
+
log$2()
|
|
11028
11049
|
], VolcClient.prototype, "_onUserPublishStreamHandler", null);
|
|
11029
11050
|
__decorate([
|
|
11030
|
-
log$2(
|
|
11051
|
+
log$2()
|
|
11031
11052
|
], VolcClient.prototype, "_onUserPublishScreenHandler", null);
|
|
11032
11053
|
__decorate([
|
|
11033
|
-
log$2(
|
|
11054
|
+
log$2()
|
|
11034
11055
|
], VolcClient.prototype, "_onUserUnpublishStreamHandler", null);
|
|
11035
11056
|
__decorate([
|
|
11036
|
-
log$2(
|
|
11057
|
+
log$2()
|
|
11037
11058
|
], VolcClient.prototype, "_onUserUnpublishScreenHandler", null);
|
|
11038
11059
|
__decorate([
|
|
11039
|
-
log$2(
|
|
11060
|
+
log$2()
|
|
11040
11061
|
], VolcClient.prototype, "setEngine", null);
|
|
11041
11062
|
__decorate([
|
|
11042
|
-
log$2(
|
|
11063
|
+
log$2()
|
|
11043
11064
|
], VolcClient.prototype, "setUserInfo", null);
|
|
11044
11065
|
__decorate([
|
|
11045
|
-
log$2(
|
|
11066
|
+
log$2()
|
|
11046
11067
|
], VolcClient.prototype, "join", null);
|
|
11047
11068
|
__decorate([
|
|
11048
|
-
log$2(
|
|
11069
|
+
log$2()
|
|
11049
11070
|
], VolcClient.prototype, "leave", null);
|
|
11050
11071
|
__decorate([
|
|
11051
|
-
log$2(
|
|
11072
|
+
log$2()
|
|
11052
11073
|
], VolcClient.prototype, "publish", null);
|
|
11053
11074
|
__decorate([
|
|
11054
|
-
log$2(
|
|
11075
|
+
log$2()
|
|
11055
11076
|
], VolcClient.prototype, "unpublish", null);
|
|
11056
11077
|
__decorate([
|
|
11057
|
-
log$2(
|
|
11078
|
+
log$2()
|
|
11058
11079
|
], VolcClient.prototype, "subscribe", null);
|
|
11059
11080
|
__decorate([
|
|
11060
|
-
log$2(
|
|
11081
|
+
log$2()
|
|
11061
11082
|
], VolcClient.prototype, "unsubscribe", null);
|
|
11062
11083
|
__decorate([
|
|
11063
|
-
log$2(
|
|
11084
|
+
log$2()
|
|
11064
11085
|
], VolcClient.prototype, "setClientRole", null);
|
|
11065
11086
|
__decorate([
|
|
11066
|
-
log$2(
|
|
11087
|
+
log$2()
|
|
11067
11088
|
], VolcClient.prototype, "getRTCStats", null);
|
|
11068
11089
|
__decorate([
|
|
11069
|
-
log$2(
|
|
11090
|
+
log$2()
|
|
11070
11091
|
], VolcClient.prototype, "getLocalAudioStats", null);
|
|
11071
11092
|
__decorate([
|
|
11072
|
-
log$2(
|
|
11093
|
+
log$2()
|
|
11073
11094
|
], VolcClient.prototype, "getRemoteAudioStats", null);
|
|
11074
11095
|
__decorate([
|
|
11075
|
-
log$2(
|
|
11096
|
+
log$2()
|
|
11076
11097
|
], VolcClient.prototype, "getLocalVideoStats", null);
|
|
11077
11098
|
__decorate([
|
|
11078
|
-
log$2(
|
|
11099
|
+
log$2()
|
|
11079
11100
|
], VolcClient.prototype, "getRemoteVideoStats", null);
|
|
11080
11101
|
return VolcClient;
|
|
11081
11102
|
}(eventemitter3$1.EventEmitter));
|
|
@@ -11641,79 +11662,79 @@ var VolcCoreRTC = /** @class */ (function () {
|
|
|
11641
11662
|
configurable: true
|
|
11642
11663
|
});
|
|
11643
11664
|
__decorate([
|
|
11644
|
-
log$2(
|
|
11665
|
+
log$2()
|
|
11645
11666
|
], VolcCoreRTC.prototype, "setEngine", null);
|
|
11646
11667
|
__decorate([
|
|
11647
|
-
log$2(
|
|
11668
|
+
log$2()
|
|
11648
11669
|
], VolcCoreRTC.prototype, "_addEventListeners", null);
|
|
11649
11670
|
__decorate([
|
|
11650
|
-
log$2(
|
|
11671
|
+
log$2()
|
|
11651
11672
|
], VolcCoreRTC.prototype, "_removeEventListeners", null);
|
|
11652
11673
|
__decorate([
|
|
11653
|
-
log$2(
|
|
11674
|
+
log$2()
|
|
11654
11675
|
], VolcCoreRTC.prototype, "_videoDeviceStateChangeHandler", null);
|
|
11655
11676
|
__decorate([
|
|
11656
|
-
log$2(
|
|
11677
|
+
log$2()
|
|
11657
11678
|
], VolcCoreRTC.prototype, "_audioDeviceStateChangeHandler", null);
|
|
11658
11679
|
__decorate([
|
|
11659
|
-
log$2(
|
|
11680
|
+
log$2()
|
|
11660
11681
|
], VolcCoreRTC.prototype, "_autoplayFailedHandler", null);
|
|
11661
11682
|
__decorate([
|
|
11662
|
-
log$2(
|
|
11683
|
+
log$2()
|
|
11663
11684
|
], VolcCoreRTC.prototype, "setUserInfo", null);
|
|
11664
11685
|
__decorate([
|
|
11665
|
-
log$2(
|
|
11686
|
+
log$2()
|
|
11666
11687
|
], VolcCoreRTC.prototype, "createClient", null);
|
|
11667
11688
|
__decorate([
|
|
11668
|
-
log$2(
|
|
11689
|
+
log$2()
|
|
11669
11690
|
], VolcCoreRTC.prototype, "createCameraVideoTrack", null);
|
|
11670
11691
|
__decorate([
|
|
11671
|
-
log$2(
|
|
11692
|
+
log$2()
|
|
11672
11693
|
], VolcCoreRTC.prototype, "createMicrophoneAndCameraTracks", null);
|
|
11673
11694
|
__decorate([
|
|
11674
|
-
log$2(
|
|
11695
|
+
log$2()
|
|
11675
11696
|
], VolcCoreRTC.prototype, "_handleAudioTrackInitConfig", null);
|
|
11676
11697
|
__decorate([
|
|
11677
|
-
log$2(
|
|
11698
|
+
log$2()
|
|
11678
11699
|
], VolcCoreRTC.prototype, "_handleVideoTrackInitConfig", null);
|
|
11679
11700
|
__decorate([
|
|
11680
|
-
log$2(
|
|
11701
|
+
log$2()
|
|
11681
11702
|
], VolcCoreRTC.prototype, "_handleScreenVideoTrackInitConfig", null);
|
|
11682
11703
|
__decorate([
|
|
11683
|
-
log$2(
|
|
11704
|
+
log$2()
|
|
11684
11705
|
], VolcCoreRTC.prototype, "createMicrophoneAudioTrack", null);
|
|
11685
11706
|
__decorate([
|
|
11686
|
-
log$2(
|
|
11707
|
+
log$2()
|
|
11687
11708
|
], VolcCoreRTC.prototype, "createScreenVideoTrack", null);
|
|
11688
11709
|
__decorate([
|
|
11689
|
-
log$2(
|
|
11710
|
+
log$2()
|
|
11690
11711
|
], VolcCoreRTC.prototype, "getSupportedCodec", null);
|
|
11691
11712
|
__decorate([
|
|
11692
|
-
log$2(
|
|
11713
|
+
log$2()
|
|
11693
11714
|
], VolcCoreRTC.prototype, "checkSystemRequirements", null);
|
|
11694
11715
|
__decorate([
|
|
11695
|
-
log$2(
|
|
11716
|
+
log$2()
|
|
11696
11717
|
], VolcCoreRTC.prototype, "getDevices", null);
|
|
11697
11718
|
__decorate([
|
|
11698
|
-
log$2(
|
|
11719
|
+
log$2()
|
|
11699
11720
|
], VolcCoreRTC.prototype, "getMicrophones", null);
|
|
11700
11721
|
__decorate([
|
|
11701
|
-
log$2(
|
|
11722
|
+
log$2()
|
|
11702
11723
|
], VolcCoreRTC.prototype, "getCameras", null);
|
|
11703
11724
|
__decorate([
|
|
11704
|
-
log$2(
|
|
11725
|
+
log$2()
|
|
11705
11726
|
], VolcCoreRTC.prototype, "_senseDevices", null);
|
|
11706
11727
|
__decorate([
|
|
11707
|
-
log$2(
|
|
11728
|
+
log$2()
|
|
11708
11729
|
], VolcCoreRTC.prototype, "getPlaybackDevices", null);
|
|
11709
11730
|
__decorate([
|
|
11710
|
-
log$2(
|
|
11731
|
+
log$2()
|
|
11711
11732
|
], VolcCoreRTC.prototype, "setLogLevel", null);
|
|
11712
11733
|
__decorate([
|
|
11713
|
-
log$2(
|
|
11734
|
+
log$2()
|
|
11714
11735
|
], VolcCoreRTC.prototype, "enableLogUpload", null);
|
|
11715
11736
|
__decorate([
|
|
11716
|
-
log$2(
|
|
11737
|
+
log$2()
|
|
11717
11738
|
], VolcCoreRTC.prototype, "disableLogUpload", null);
|
|
11718
11739
|
return VolcCoreRTC;
|
|
11719
11740
|
}());
|