@tellescope/video-chat 0.0.11 → 0.0.15
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/lib/cjs/native/RNVideoRenderView.d.ts +11 -0
- package/lib/cjs/native/RNVideoRenderView.d.ts.map +1 -0
- package/lib/cjs/native/RNVideoRenderView.js +62 -0
- package/lib/cjs/native/RNVideoRenderView.js.map +1 -0
- package/lib/cjs/native/bridge.d.ts +36 -0
- package/lib/cjs/native/bridge.d.ts.map +1 -0
- package/lib/cjs/native/bridge.js +59 -0
- package/lib/cjs/native/bridge.js.map +1 -0
- package/lib/cjs/video.d.ts +14 -3
- package/lib/cjs/video.d.ts.map +1 -1
- package/lib/cjs/video.js +20 -9
- package/lib/cjs/video.js.map +1 -1
- package/lib/cjs/video.native.d.ts +6 -0
- package/lib/cjs/video.native.d.ts.map +1 -0
- package/lib/cjs/video.native.js +333 -0
- package/lib/cjs/video.native.js.map +1 -0
- package/lib/esm/native/RNVideoRenderView.d.ts +11 -0
- package/lib/esm/native/RNVideoRenderView.d.ts.map +1 -0
- package/lib/esm/native/RNVideoRenderView.js +56 -0
- package/lib/esm/native/RNVideoRenderView.js.map +1 -0
- package/lib/esm/native/bridge.d.ts +36 -0
- package/lib/esm/native/bridge.d.ts.map +1 -0
- package/lib/esm/native/bridge.js +55 -0
- package/lib/esm/native/bridge.js.map +1 -0
- package/lib/esm/video.d.ts +14 -3
- package/lib/esm/video.d.ts.map +1 -1
- package/lib/esm/video.js +22 -17
- package/lib/esm/video.js.map +1 -1
- package/lib/esm/video.native.d.ts +6 -0
- package/lib/esm/video.native.d.ts.map +1 -0
- package/lib/esm/video.native.js +307 -0
- package/lib/esm/video.native.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/native/RNVideoRenderView.tsx +31 -0
- package/src/native/bridge.ts +60 -0
- package/src/video.native.tsx +309 -0
- package/src/video.tsx +41 -19
- package/lib/cjs/chat.d.ts +0 -69
- package/lib/cjs/chat.d.ts.map +0 -1
- package/lib/cjs/chat.js +0 -171
- package/lib/cjs/chat.js.map +0 -1
- package/lib/esm/chat.d.ts +0 -69
- package/lib/esm/chat.d.ts.map +0 -1
- package/lib/esm/chat.js +0 -160
- package/lib/esm/chat.js.map +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
export declare class RNVideoView extends React.Component<{
|
|
4
|
+
tileId: string | number;
|
|
5
|
+
style?: ViewStyle;
|
|
6
|
+
}> {
|
|
7
|
+
componentDidMount(): void;
|
|
8
|
+
componentWillUnmount(): void;
|
|
9
|
+
render(): JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=RNVideoRenderView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNVideoRenderView.d.ts","sourceRoot":"","sources":["../../../src/native/RNVideoRenderView.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA0C,SAAS,EAAE,MAAM,cAAc,CAAC;AAGjF,qBAAa,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC;IAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;IAC9F,iBAAiB;IAUjB,oBAAoB;IAIpB,MAAM;CAGP"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.RNVideoView = void 0;
|
|
33
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
34
|
+
var react_1 = __importDefault(require("react"));
|
|
35
|
+
var react_native_1 = require("react-native");
|
|
36
|
+
var bridge_1 = require("./bridge");
|
|
37
|
+
var RNVideoView = /** @class */ (function (_super) {
|
|
38
|
+
__extends(RNVideoView, _super);
|
|
39
|
+
function RNVideoView() {
|
|
40
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
41
|
+
}
|
|
42
|
+
RNVideoView.prototype.componentDidMount = function () {
|
|
43
|
+
var _this = this;
|
|
44
|
+
// we need to delay the bind video
|
|
45
|
+
// Because "componentDidMount" will be called "immediately after the initial rendering occurs"
|
|
46
|
+
// This is *before* RCTUIManager add this view to register (so that viewForReactTag() can return a view)
|
|
47
|
+
// So we need to dispatch bindVideoView after this function complete
|
|
48
|
+
setTimeout(function () {
|
|
49
|
+
bridge_1.NativeFunction.bindVideoView((0, react_native_1.findNodeHandle)(_this), _this.props.tileId);
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
RNVideoView.prototype.componentWillUnmount = function () {
|
|
53
|
+
bridge_1.NativeFunction.unbindVideoView(this.props.tileId);
|
|
54
|
+
};
|
|
55
|
+
RNVideoView.prototype.render = function () {
|
|
56
|
+
return (0, jsx_runtime_1.jsx)(RNVideoRenderViewNative, __assign({}, this.props), void 0);
|
|
57
|
+
};
|
|
58
|
+
return RNVideoView;
|
|
59
|
+
}(react_1.default.Component));
|
|
60
|
+
exports.RNVideoView = RNVideoView;
|
|
61
|
+
var RNVideoRenderViewNative = (0, react_native_1.requireNativeComponent)('RNVideoView');
|
|
62
|
+
//# sourceMappingURL=RNVideoRenderView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNVideoRenderView.js","sourceRoot":"","sources":["../../../src/native/RNVideoRenderView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,gDAA0B;AAC1B,6CAAiF;AACjF,mCAA0C;AAE1C;IAAiC,+BAA+D;IAAhG;;IAkBA,CAAC;IAjBC,uCAAiB,GAAjB;QAAA,iBAQC;QAPC,mCAAmC;QACnC,8FAA8F;QAC9F,wGAAwG;QACxG,oEAAoE;QACpE,UAAU,CAAC;YACT,uBAAc,CAAC,aAAa,CAAC,IAAA,6BAAc,EAAC,KAAI,CAAC,EAAE,KAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,0CAAoB,GAApB;QACE,uBAAc,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;IAED,4BAAM,GAAN;QACE,OAAO,uBAAC,uBAAuB,eAAK,IAAI,CAAC,KAAK,UAAI,CAAC;IACrD,CAAC;IACH,kBAAC;AAAD,CAAC,AAlBD,CAAiC,eAAK,CAAC,SAAS,GAkB/C;AAlBY,kCAAW;AAoBxB,IAAM,uBAAuB,GAAG,IAAA,qCAAsB,EAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
2
|
+
export declare const MobileSDKEvent: {
|
|
3
|
+
OnMeetingStart: string;
|
|
4
|
+
OnMeetingEnd: string;
|
|
5
|
+
OnAttendeesJoin: string;
|
|
6
|
+
OnAttendeesLeave: string;
|
|
7
|
+
OnAttendeesMute: string;
|
|
8
|
+
OnAttendeesUnmute: string;
|
|
9
|
+
OnAddVideoTile: string;
|
|
10
|
+
OnRemoveVideoTile: string;
|
|
11
|
+
OnError: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const MeetingError: {
|
|
14
|
+
OnMaximumConcurrentVideoReached: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function getSDKEventEmitter(): NativeEventEmitter;
|
|
17
|
+
/**
|
|
18
|
+
* These are functions available for React native to call on native
|
|
19
|
+
* i.e. React Native -> Native
|
|
20
|
+
*
|
|
21
|
+
* NativeModules.NativeMobileSDKBridge.startMeeting(meetingId, userName)
|
|
22
|
+
* NativeModules.NativeMobileSDKBridge.stopMeeting()
|
|
23
|
+
* NativeModules.NativeMobileSDKBridge.setMute(isMute) -> boolean
|
|
24
|
+
* NativeModules.NativeMobileSDKBridge.setCameraOn(isOn) -> boolean
|
|
25
|
+
* NativeModules.NativeMobileSDKBridge.bindVideoView(reactTagId, tileId)
|
|
26
|
+
* NativeModules.NativeMobileSDKBridge.unbindVideoView(reactTagId, tileId)
|
|
27
|
+
*/
|
|
28
|
+
export declare const NativeFunction: {
|
|
29
|
+
startMeeting: any;
|
|
30
|
+
stopMeeting: any;
|
|
31
|
+
setMute: any;
|
|
32
|
+
setCameraOn: any;
|
|
33
|
+
bindVideoView: any;
|
|
34
|
+
unbindVideoView: any;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/native/bridge.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiB,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAgBjE,eAAO,MAAM,cAAc;;;;;;;;;;CAU1B,CAAA;AAED,eAAO,MAAM,YAAY;;CAExB,CAAA;AAED,wBAAgB,kBAAkB,uBAEjC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
* SPDX-License-Identifier: MIT-0
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.NativeFunction = exports.getSDKEventEmitter = exports.MeetingError = exports.MobileSDKEvent = void 0;
|
|
8
|
+
var react_native_1 = require("react-native");
|
|
9
|
+
/**
|
|
10
|
+
* These are the function that will be called from native side
|
|
11
|
+
* i.e. Native -> React Native
|
|
12
|
+
*
|
|
13
|
+
* NativeEventEmitter.onMeetingStart(meetingName)
|
|
14
|
+
* NativeEventEmitter.onMeetingEnd()
|
|
15
|
+
* NativeEventEmitter.onAttendeesJoin(attendeeInfo)
|
|
16
|
+
* NativeEventEmitter.onAttendeesLeave(attendeeInfo)
|
|
17
|
+
* NativeEventEmitter.onAddVideoTile(tileState)
|
|
18
|
+
* NativeEventEmitter.onRemoveVideoTile(tileState)
|
|
19
|
+
* NativeEventEmitter.onError(errorMessage)
|
|
20
|
+
*/
|
|
21
|
+
var _eventEmitter = new react_native_1.NativeEventEmitter(react_native_1.NativeModules.NativeMobileSDKBridge);
|
|
22
|
+
exports.MobileSDKEvent = {
|
|
23
|
+
OnMeetingStart: 'OnMeetingStart',
|
|
24
|
+
OnMeetingEnd: 'OnMeetingEnd',
|
|
25
|
+
OnAttendeesJoin: 'OnAttendeesJoin',
|
|
26
|
+
OnAttendeesLeave: 'OnAttendeesLeave',
|
|
27
|
+
OnAttendeesMute: 'OnAttendeesMute',
|
|
28
|
+
OnAttendeesUnmute: 'OnAttendeesUnmute',
|
|
29
|
+
OnAddVideoTile: 'OnAddVideoTile',
|
|
30
|
+
OnRemoveVideoTile: 'OnRemoveVideoTile',
|
|
31
|
+
OnError: 'OnError',
|
|
32
|
+
};
|
|
33
|
+
exports.MeetingError = {
|
|
34
|
+
OnMaximumConcurrentVideoReached: "OnMaximumConcurrentVideoReached"
|
|
35
|
+
};
|
|
36
|
+
function getSDKEventEmitter() {
|
|
37
|
+
return _eventEmitter;
|
|
38
|
+
}
|
|
39
|
+
exports.getSDKEventEmitter = getSDKEventEmitter;
|
|
40
|
+
/**
|
|
41
|
+
* These are functions available for React native to call on native
|
|
42
|
+
* i.e. React Native -> Native
|
|
43
|
+
*
|
|
44
|
+
* NativeModules.NativeMobileSDKBridge.startMeeting(meetingId, userName)
|
|
45
|
+
* NativeModules.NativeMobileSDKBridge.stopMeeting()
|
|
46
|
+
* NativeModules.NativeMobileSDKBridge.setMute(isMute) -> boolean
|
|
47
|
+
* NativeModules.NativeMobileSDKBridge.setCameraOn(isOn) -> boolean
|
|
48
|
+
* NativeModules.NativeMobileSDKBridge.bindVideoView(reactTagId, tileId)
|
|
49
|
+
* NativeModules.NativeMobileSDKBridge.unbindVideoView(reactTagId, tileId)
|
|
50
|
+
*/
|
|
51
|
+
exports.NativeFunction = {
|
|
52
|
+
startMeeting: react_native_1.NativeModules.NativeMobileSDKBridge.startMeeting,
|
|
53
|
+
stopMeeting: react_native_1.NativeModules.NativeMobileSDKBridge.stopMeeting,
|
|
54
|
+
setMute: react_native_1.NativeModules.NativeMobileSDKBridge.setMute,
|
|
55
|
+
setCameraOn: react_native_1.NativeModules.NativeMobileSDKBridge.setCameraOn,
|
|
56
|
+
bindVideoView: react_native_1.NativeModules.NativeMobileSDKBridge.bindVideoView,
|
|
57
|
+
unbindVideoView: react_native_1.NativeModules.NativeMobileSDKBridge.unbindVideoView,
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../../src/native/bridge.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6CAAiE;AAEjE;;;;;;;;;;;GAWG;AACH,IAAM,aAAa,GAAG,IAAI,iCAAkB,CAAC,4BAAa,CAAC,qBAAqB,CAAC,CAAC;AAErE,QAAA,cAAc,GAAG;IAC5B,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,OAAO,EAAE,SAAS;CACnB,CAAA;AAEY,QAAA,YAAY,GAAG;IAC1B,+BAA+B,EAAE,iCAAiC;CACnE,CAAA;AAED,SAAgB,kBAAkB;IAChC,OAAO,aAAa,CAAC;AACvB,CAAC;AAFD,gDAEC;AAED;;;;;;;;;;GAUG;AACU,QAAA,cAAc,GAAG;IAC5B,YAAY,EAAE,4BAAa,CAAC,qBAAqB,CAAC,YAAY;IAC9D,WAAW,EAAE,4BAAa,CAAC,qBAAqB,CAAC,WAAW;IAC5D,OAAO,EAAE,4BAAa,CAAC,qBAAqB,CAAC,OAAO;IACpD,WAAW,EAAE,4BAAa,CAAC,qBAAqB,CAAC,WAAW;IAC5D,aAAa,EAAE,4BAAa,CAAC,qBAAqB,CAAC,aAAa;IAChE,eAAe,EAAE,4BAAa,CAAC,qBAAqB,CAAC,eAAe;CACrE,CAAA"}
|
package/lib/cjs/video.d.ts
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { UserIdentity } from "@tellescope/types-utilities";
|
|
3
3
|
import { AttendeeInfo, MeetingInfo } from '@tellescope/types-models';
|
|
4
|
-
import {
|
|
4
|
+
import { darkTheme, VideoTileGrid } from 'amazon-chime-sdk-component-library-react';
|
|
5
|
+
export declare type AttendeeDisplayInfo = {
|
|
6
|
+
attendeeId: string;
|
|
7
|
+
externalUserId: string;
|
|
8
|
+
};
|
|
5
9
|
export declare const CurrentCallContext: React.Context<{
|
|
6
10
|
meeting: MeetingInfo | undefined;
|
|
7
11
|
setMeeting: (m: MeetingInfo | undefined) => void;
|
|
12
|
+
videoIsEnabled: boolean;
|
|
13
|
+
toggleVideo: () => Promise<void>;
|
|
14
|
+
attendees: AttendeeDisplayInfo[];
|
|
15
|
+
shareScreenId: number | null;
|
|
16
|
+
videoTiles: (number | string)[];
|
|
8
17
|
}>;
|
|
9
|
-
interface VideoProps {
|
|
18
|
+
export interface VideoProps {
|
|
10
19
|
children?: React.ReactNode;
|
|
11
|
-
theme?: typeof
|
|
20
|
+
theme?: typeof darkTheme;
|
|
12
21
|
}
|
|
13
22
|
export declare const WithVideo: ({ children, theme }: VideoProps) => JSX.Element;
|
|
14
23
|
export declare const useStartVideoCall: () => {
|
|
@@ -21,6 +30,7 @@ export declare const useStartVideoCall: () => {
|
|
|
21
30
|
addAttendees: (attendees: UserIdentity[]) => Promise<void>;
|
|
22
31
|
endMeeting: () => Promise<void>;
|
|
23
32
|
};
|
|
33
|
+
export declare type StartVideoCallReturnType = ReturnType<typeof useStartVideoCall>;
|
|
24
34
|
export declare const useJoinVideoCall: () => {
|
|
25
35
|
meeting: MeetingInfo | undefined;
|
|
26
36
|
videoIsEnabled: boolean;
|
|
@@ -31,5 +41,6 @@ export declare const useJoinVideoCall: () => {
|
|
|
31
41
|
Attendee: AttendeeInfo;
|
|
32
42
|
}) => Promise<void>;
|
|
33
43
|
};
|
|
44
|
+
export declare type JoinVideoCallReturnType = ReturnType<typeof useJoinVideoCall>;
|
|
34
45
|
export { VideoTileGrid };
|
|
35
46
|
//# sourceMappingURL=video.d.ts.map
|
package/lib/cjs/video.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/video.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/video.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAA;AAM7E,OAAO,EACL,YAAY,EACb,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,YAAY,EACZ,WAAW,EACZ,MAAM,0BAA0B,CAAA;AAYjC,OAAO,EAEL,SAAS,EAGT,aAAa,EAYd,MAAM,0CAA0C,CAAC;AAGlD,oBAAY,mBAAmB,GAAI;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjF,eAAO,MAAM,kBAAkB;aACpB,WAAW,GAAG,SAAS;oBAAkB,WAAW,GAAG,SAAS,KAAK,IAAI;oBAClE,OAAO;iBAAe,MAAM,QAAQ,IAAI,CAAC;eAC9C,mBAAmB,EAAE;mBAAiB,MAAM,GAAG,IAAI;gBAClD,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;EAC/B,CAAA;AACF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,SAAS,CAAC;CAC1B;AAoBD,eAAO,MAAM,SAAS,wBAAmC,UAAU,gBAQlE,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;uBArCgB,QAAQ,IAAI,CAAC;;8BAmEN,YAAY,EAAE;;CAkBlE,CAAA;AACD,oBAAY,wBAAwB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3E,eAAO,MAAM,gBAAgB;;;uBAxFiB,QAAQ,IAAI,CAAC;+BA4FjB;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,gBAAgB;QAAE,QAAQ,EAAE,YAAY,CAAA;KAAE;CAO3G,CAAA;AACD,oBAAY,uBAAuB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzE,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
package/lib/cjs/video.js
CHANGED
|
@@ -76,19 +76,31 @@ Object.defineProperty(exports, "VideoTileGrid", { enumerable: true, get: functio
|
|
|
76
76
|
// LocalVideo,
|
|
77
77
|
amazon_chime_sdk_component_library_react_1.VideoTileGrid; } });
|
|
78
78
|
exports.CurrentCallContext = react_1.default.createContext({});
|
|
79
|
+
var WithContext = function (_a) {
|
|
80
|
+
var children = _a.children;
|
|
81
|
+
var _b = (0, react_1.useState)(undefined), meeting = _b[0], setMeeting = _b[1];
|
|
82
|
+
var _c = (0, amazon_chime_sdk_component_library_react_1.useLocalVideo)(), toggleVideo = _c.toggleVideo, videoIsEnabled = _c.isVideoEnabled;
|
|
83
|
+
var roster = (0, amazon_chime_sdk_component_library_react_1.useRosterState)().roster;
|
|
84
|
+
var tileId = (0, amazon_chime_sdk_component_library_react_1.useContentShareState)().tileId;
|
|
85
|
+
var tiles = (0, amazon_chime_sdk_component_library_react_1.useRemoteVideoTileState)().tiles;
|
|
86
|
+
var attendees = [];
|
|
87
|
+
for (var attendeeId in roster) {
|
|
88
|
+
var externalUserId = roster[attendeeId].externalUserId;
|
|
89
|
+
attendees.push({ attendeeId: attendeeId, externalUserId: externalUserId });
|
|
90
|
+
}
|
|
91
|
+
return ((0, jsx_runtime_1.jsx)(exports.CurrentCallContext.Provider, __assign({ value: { attendees: attendees, videoTiles: tiles, shareScreenId: tileId, meeting: meeting, setMeeting: setMeeting, videoIsEnabled: videoIsEnabled, toggleVideo: toggleVideo } }, { children: children }), void 0));
|
|
92
|
+
};
|
|
79
93
|
var WithVideo = function (_a) {
|
|
80
|
-
var children = _a.children, _b = _a.theme, theme = _b === void 0 ? amazon_chime_sdk_component_library_react_1.
|
|
81
|
-
|
|
82
|
-
return ((0, jsx_runtime_1.jsx)(exports.CurrentCallContext.Provider, __assign({ value: { meeting: meeting, setMeeting: setMeeting } }, { children: (0, jsx_runtime_1.jsx)(styled_components_1.ThemeProvider, __assign({ theme: theme }, { children: (0, jsx_runtime_1.jsx)(amazon_chime_sdk_component_library_react_1.MeetingProvider, { children: children }, void 0) }), void 0) }), void 0));
|
|
94
|
+
var children = _a.children, _b = _a.theme, theme = _b === void 0 ? amazon_chime_sdk_component_library_react_1.darkTheme : _b;
|
|
95
|
+
return ((0, jsx_runtime_1.jsx)(styled_components_1.ThemeProvider, __assign({ theme: theme }, { children: (0, jsx_runtime_1.jsx)(amazon_chime_sdk_component_library_react_1.MeetingProvider, { children: (0, jsx_runtime_1.jsx)(WithContext, { children: children }, void 0) }, void 0) }), void 0));
|
|
83
96
|
};
|
|
84
97
|
exports.WithVideo = WithVideo;
|
|
85
98
|
var useStartVideoCall = function () {
|
|
86
99
|
var _a = (0, react_1.useState)(false), starting = _a[0], setStarting = _a[1];
|
|
87
100
|
var _b = (0, react_1.useState)(false), ending = _b[0], setEnding = _b[1];
|
|
88
|
-
var _c = react_1.default.useContext(exports.CurrentCallContext), meeting = _c.meeting, setMeeting = _c.setMeeting;
|
|
101
|
+
var _c = react_1.default.useContext(exports.CurrentCallContext), meeting = _c.meeting, setMeeting = _c.setMeeting, toggleVideo = _c.toggleVideo, videoIsEnabled = _c.videoIsEnabled;
|
|
89
102
|
var session = (0, authentication_1.useSession)();
|
|
90
103
|
var meetingManager = (0, amazon_chime_sdk_component_library_react_1.useMeetingManager)();
|
|
91
|
-
var _d = (0, amazon_chime_sdk_component_library_react_1.useLocalVideo)(), toggleVideo = _d.toggleVideo, isVideoEnabled = _d.isVideoEnabled;
|
|
92
104
|
var createAndStartMeeting = function (initialAttendees) { return __awaiter(void 0, void 0, void 0, function () {
|
|
93
105
|
var _a, meeting_1, host, err_1;
|
|
94
106
|
return __generator(this, function (_b) {
|
|
@@ -162,13 +174,12 @@ var useStartVideoCall = function () {
|
|
|
162
174
|
}
|
|
163
175
|
});
|
|
164
176
|
}); };
|
|
165
|
-
return { starting: starting, ending: ending, meeting: meeting, videoIsEnabled:
|
|
177
|
+
return { starting: starting, ending: ending, meeting: meeting, videoIsEnabled: videoIsEnabled, toggleVideo: toggleVideo, createAndStartMeeting: createAndStartMeeting, addAttendees: addAttendees, endMeeting: endMeeting };
|
|
166
178
|
};
|
|
167
179
|
exports.useStartVideoCall = useStartVideoCall;
|
|
168
180
|
var useJoinVideoCall = function () {
|
|
169
181
|
var meetingManager = (0, amazon_chime_sdk_component_library_react_1.useMeetingManager)();
|
|
170
|
-
var _a = (
|
|
171
|
-
var _b = react_1.default.useContext(exports.CurrentCallContext), meeting = _b.meeting, setMeeting = _b.setMeeting;
|
|
182
|
+
var _a = react_1.default.useContext(exports.CurrentCallContext), meeting = _a.meeting, setMeeting = _a.setMeeting, toggleVideo = _a.toggleVideo, videoIsEnabled = _a.videoIsEnabled;
|
|
172
183
|
var joinMeeting = function (meetingInfo, attendeeInfo) { return __awaiter(void 0, void 0, void 0, function () {
|
|
173
184
|
return __generator(this, function (_a) {
|
|
174
185
|
switch (_a.label) {
|
|
@@ -183,7 +194,7 @@ var useJoinVideoCall = function () {
|
|
|
183
194
|
}
|
|
184
195
|
});
|
|
185
196
|
}); };
|
|
186
|
-
return { meeting: meeting, videoIsEnabled:
|
|
197
|
+
return { meeting: meeting, videoIsEnabled: videoIsEnabled, toggleVideo: toggleVideo, joinMeeting: joinMeeting };
|
|
187
198
|
};
|
|
188
199
|
exports.useJoinVideoCall = useJoinVideoCall;
|
|
189
200
|
//# sourceMappingURL=video.js.map
|
package/lib/cjs/video.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.js","sourceRoot":"","sources":["../../src/video.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAA,EAAE,YAAY,cAAA,EAAE,UAAU,YAAA,EAAE,CAAA;AACpH,CAAC,CAAA;AAhDY,QAAA,iBAAiB,qBAgD7B;AAGM,IAAM,gBAAgB,GAAG;IAC9B,IAAM,cAAc,GAAG,IAAA,4DAAiB,GAAE,CAAC;IACrC,IAAA,KAAuD,eAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,EAAzF,OAAO,aAAA,EAAE,UAAU,gBAAA,EAAE,WAAW,iBAAA,EAAE,cAAc,oBAAyC,CAAA;IAEjG,IAAM,WAAW,GAAG,UAAO,WAAqC,EAAE,YAAwC;;;wBACxG,qBAAM,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,aAAA,EAAE,YAAY,cAAA,EAAE,CAAC,EAAA;;oBAAxD,SAAwD,CAAC,CAAC,+CAA+C;oBACzG,qBAAM,cAAc,CAAC,KAAK,EAAE,EAAA;;oBAA5B,SAA4B,CAAC,CAAC,wFAAwF;oBACtH,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;;;;SAChC,CAAA;IAED,OAAO,EAAE,OAAO,SAAA,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,aAAA,EAAE,WAAW,aAAA,EAAE,CAAA;AAC9E,CAAC,CAAA;AAXY,QAAA,gBAAgB,oBAW5B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JoinVideoCallReturnType, StartVideoCallReturnType, VideoProps } from "./video.js";
|
|
2
|
+
export declare const WithVideo: ({ children }: VideoProps) => JSX.Element;
|
|
3
|
+
export declare const useStartVideoCall: () => StartVideoCallReturnType;
|
|
4
|
+
export declare const useJoinVideoCall: () => JoinVideoCallReturnType;
|
|
5
|
+
export declare const VideoTileGrid: () => JSX.Element;
|
|
6
|
+
//# sourceMappingURL=video.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.native.d.ts","sourceRoot":"","sources":["../../src/video.native.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAEL,uBAAuB,EACvB,wBAAwB,EACxB,UAAU,EAEX,MAAM,YAAY,CAAA;AAenB,eAAO,MAAM,SAAS,iBAAmB,UAAU,gBAiGlD,CAAA;AAED,eAAO,MAAM,iBAAiB,QAAO,wBA4CpC,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAO,uBAQnC,CAAA;AACD,eAAO,MAAM,aAAa,mBAgDzB,CAAA"}
|