@realsee/live 0.5.3 → 0.5.4
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/live/controller.d.ts +1 -1
- package/dist/live/createLiveReact.d.ts +1 -1
- package/dist/live/live.d.ts +1 -1
- package/dist/realsee-live.cjs.development.js +29 -26
- 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 +30 -27
- package/dist/realsee-live.esm.js.map +1 -1
- package/dist/realsee-live.umd.development.js +58571 -39338
- 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/dist/typings/live/EventType.d.ts +3 -3
- package/dist/typings/live/GetVoiceSign.d.ts +1 -1
- package/dist/typings/live/LiveConnectOptions.d.ts +1 -1
- package/dist/typings/live/LiveMsg.d.ts +3 -3
- package/dist/typings/live/RoomInfo.d.ts +1 -1
- package/dist/typings/live/UserInfo.d.ts +2 -2
- package/dist/typings/live/UserVolume.d.ts +1 -1
- package/dist/typings/live/WebSocket.d.ts +1 -1
- package/dist/typings/react/RTCActionReactCallback.d.ts +1 -1
- package/dist/typings/rtc/eventType.d.ts +1 -1
- package/dist/utils/RobustWebSocket.d.ts +5 -5
- package/dist/utils/subscribe.d.ts +1 -1
- package/docs/classes/BrowserRTC4Chime.html +2 -2
- package/package.json +16 -15
|
@@ -2,7 +2,7 @@ import { LiveMsg } from '../typings';
|
|
|
2
2
|
import { LiveState } from '../typings/live/LiveState';
|
|
3
3
|
import { RobustWebSocketEventDetail } from '../utils/RobustWebSocket';
|
|
4
4
|
import { Subscribe } from '../utils/subscribe';
|
|
5
|
-
export type LiveControllerEventMap = {
|
|
5
|
+
export declare type LiveControllerEventMap = {
|
|
6
6
|
stateChange: (state: LiveState, prevState: LiveState) => void;
|
|
7
7
|
message: (message: LiveMsg) => void;
|
|
8
8
|
reconnected: (detail: RobustWebSocketEventDetail) => void;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { BuiltinActionType, BuiltinEventType, KeyframeTypes, LiveConnectOptions, LiveEventType, LiveOptions, MicroStatus, RTCEventType, RTCType, UserInfo } from '../typings';
|
|
3
3
|
import { LiveState } from '../typings/live/LiveState';
|
|
4
4
|
import { Live } from './live';
|
|
5
|
-
export type LiveProviderPropTypes<KeyframesSnapshot extends Record<string, any>> = {
|
|
5
|
+
export declare type LiveProviderPropTypes<KeyframesSnapshot extends Record<string, any>> = {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
live?: Live<KeyframesSnapshot>;
|
|
8
8
|
};
|
package/dist/live/live.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { RTCProtocol } from '../rtc';
|
|
|
3
3
|
import { EventType, KeyframeTypes, LiveOptions, RoomInfo, RTCType, UserInfo, BuiltinEventType, BuiltinActionType, MicroStatus, LiveConnectOptions } from '../typings';
|
|
4
4
|
import { LiveState } from '../typings/live/LiveState';
|
|
5
5
|
import { Subscribe } from '../utils/subscribe';
|
|
6
|
-
export type LiveBuiltInData<KeyframesSnapshot> = {
|
|
6
|
+
export declare type LiveBuiltInData<KeyframesSnapshot> = {
|
|
7
7
|
selfInfo?: UserInfo;
|
|
8
8
|
userList?: UserInfo[];
|
|
9
9
|
roomInfo?: RoomInfo;
|
|
@@ -69,7 +69,7 @@ function __generator$1(thisArg, body) {
|
|
|
69
69
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
70
70
|
function step(op) {
|
|
71
71
|
if (f) throw new TypeError("Generator is already executing.");
|
|
72
|
-
while (
|
|
72
|
+
while (_) try {
|
|
73
73
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
74
74
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
75
75
|
switch (op[0]) {
|
|
@@ -657,7 +657,7 @@ var BrowserRTC4Chime = /** @class */ (function (_super) {
|
|
|
657
657
|
// 挂载签名钩子
|
|
658
658
|
_this._getVoiceSign = options.getVoiceSign;
|
|
659
659
|
_this._initDom();
|
|
660
|
-
_this.logger = new amazonChimeSdkJs.ConsoleLogger('WebRTCLogger', options.logLevel || amazonChimeSdkJs.LogLevel.
|
|
660
|
+
_this.logger = new amazonChimeSdkJs.ConsoleLogger('WebRTCLogger', options.logLevel || amazonChimeSdkJs.LogLevel.INFO);
|
|
661
661
|
_this.deviceController = new amazonChimeSdkJs.DefaultDeviceController(_this.logger);
|
|
662
662
|
_this.initObservers();
|
|
663
663
|
return _this;
|
|
@@ -681,7 +681,7 @@ var BrowserRTC4Chime = /** @class */ (function (_super) {
|
|
|
681
681
|
this.emit('joinWillStart');
|
|
682
682
|
_d.label = 1;
|
|
683
683
|
case 1:
|
|
684
|
-
_d.trys.push([1,
|
|
684
|
+
_d.trys.push([1, 5, , 6]);
|
|
685
685
|
return [4 /*yield*/, this._getVoiceSign(__assign$1(__assign$1({}, options), { roomId: options.roomId || 0 }))];
|
|
686
686
|
case 2:
|
|
687
687
|
_a = _d.sent(), userId = _a.userId, userSig = _a.userSig;
|
|
@@ -725,21 +725,18 @@ var BrowserRTC4Chime = /** @class */ (function (_super) {
|
|
|
725
725
|
defaultAudioInput = audioInputDevices.find(function (device) { return device.deviceId === 'default'; });
|
|
726
726
|
otherAudioInput = audioInputDevices.find(function (device) { return device.deviceId !== ''; });
|
|
727
727
|
this.audioInput = defaultAudioInput || otherAudioInput;
|
|
728
|
-
return [4 /*yield*/, this.meetingSession.audioVideo.
|
|
728
|
+
return [4 /*yield*/, this.meetingSession.audioVideo.startAudioInput(((_c = this.audioInput) === null || _c === void 0 ? void 0 : _c.deviceId) || 'default')];
|
|
729
729
|
case 4:
|
|
730
|
-
_d.sent();
|
|
731
|
-
return [4 /*yield*/, this.meetingSession.audioVideo.chooseAudioInputDevice(((_c = this.audioInput) === null || _c === void 0 ? void 0 : _c.deviceId) || 'default')];
|
|
732
|
-
case 5:
|
|
733
730
|
_d.sent();
|
|
734
731
|
this.meetingSession.audioVideo.start();
|
|
735
|
-
return [3 /*break*/,
|
|
736
|
-
case
|
|
732
|
+
return [3 /*break*/, 6];
|
|
733
|
+
case 5:
|
|
737
734
|
e_1 = _d.sent();
|
|
738
735
|
this.emit('error', e_1);
|
|
739
736
|
this.logger.error(e_1.message);
|
|
740
737
|
success(false);
|
|
741
|
-
return [3 /*break*/,
|
|
742
|
-
case
|
|
738
|
+
return [3 /*break*/, 6];
|
|
739
|
+
case 6: return [2 /*return*/];
|
|
743
740
|
}
|
|
744
741
|
});
|
|
745
742
|
}); })];
|
|
@@ -754,21 +751,27 @@ var BrowserRTC4Chime = /** @class */ (function (_super) {
|
|
|
754
751
|
var _a, _b;
|
|
755
752
|
_this.joined = false;
|
|
756
753
|
var observer = {
|
|
757
|
-
audioVideoDidStop: function (sessionStatus) {
|
|
758
|
-
var sessionStatusCode
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
754
|
+
audioVideoDidStop: function (sessionStatus) { return __awaiter$1(_this, void 0, void 0, function () {
|
|
755
|
+
var sessionStatusCode;
|
|
756
|
+
var _a;
|
|
757
|
+
return __generator$1(this, function (_b) {
|
|
758
|
+
sessionStatusCode = sessionStatus.statusCode();
|
|
759
|
+
(_a = this.meetingSession) === null || _a === void 0 ? void 0 : _a.deviceController.destroy();
|
|
760
|
+
if (sessionStatusCode === amazonChimeSdkJs.MeetingSessionStatusCode.Left) {
|
|
761
|
+
/*
|
|
762
|
+
- You called meetingSession.audioVideo.stop().
|
|
763
|
+
- When closing a browser window or page, Chime SDK attempts to leave the session.
|
|
764
|
+
*/
|
|
765
|
+
this.logger.info('You left the session');
|
|
766
|
+
success(true);
|
|
767
|
+
}
|
|
768
|
+
else {
|
|
769
|
+
this.logger.info("Stopped with a session status code: ".concat(sessionStatusCode));
|
|
770
|
+
success(true);
|
|
771
|
+
}
|
|
772
|
+
return [2 /*return*/];
|
|
773
|
+
});
|
|
774
|
+
}); },
|
|
772
775
|
};
|
|
773
776
|
(_a = _this.meetingSession) === null || _a === void 0 ? void 0 : _a.audioVideo.addObserver(observer);
|
|
774
777
|
(_b = _this.meetingSession) === null || _b === void 0 ? void 0 : _b.audioVideo.stop();
|