@tellescope/video-chat 0.0.13 → 0.0.14

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.
@@ -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,EAAE,SAAS,CAAA;CAAE,CAAC;IAC7F,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,+BAA8D;IAA/F;;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"}
@@ -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,EAAE,SAAS,CAAA;CAAE,CAAC;IAC7F,iBAAiB;IAUjB,oBAAoB;IAIpB,MAAM;CAGP"}
@@ -0,0 +1,56 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ import { jsx as _jsx } from "react/jsx-runtime";
28
+ import React from 'react';
29
+ import { requireNativeComponent, findNodeHandle } from 'react-native';
30
+ import { NativeFunction } from './bridge';
31
+ var RNVideoView = /** @class */ (function (_super) {
32
+ __extends(RNVideoView, _super);
33
+ function RNVideoView() {
34
+ return _super !== null && _super.apply(this, arguments) || this;
35
+ }
36
+ RNVideoView.prototype.componentDidMount = function () {
37
+ var _this = this;
38
+ // we need to delay the bind video
39
+ // Because "componentDidMount" will be called "immediately after the initial rendering occurs"
40
+ // This is *before* RCTUIManager add this view to register (so that viewForReactTag() can return a view)
41
+ // So we need to dispatch bindVideoView after this function complete
42
+ setTimeout(function () {
43
+ NativeFunction.bindVideoView(findNodeHandle(_this), _this.props.tileId);
44
+ });
45
+ };
46
+ RNVideoView.prototype.componentWillUnmount = function () {
47
+ NativeFunction.unbindVideoView(this.props.tileId);
48
+ };
49
+ RNVideoView.prototype.render = function () {
50
+ return _jsx(RNVideoRenderViewNative, __assign({}, this.props), void 0);
51
+ };
52
+ return RNVideoView;
53
+ }(React.Component));
54
+ export { RNVideoView };
55
+ var RNVideoRenderViewNative = requireNativeComponent('RNVideoView');
56
+ //# sourceMappingURL=RNVideoRenderView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNVideoRenderView.js","sourceRoot":"","sources":["../../../src/native/RNVideoRenderView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAa,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C;IAAiC,+BAA8D;IAA/F;;IAkBA,CAAC;IAjBC,uCAAiB,GAAjB;QAAA,iBAQC;QAPC,mCAAmC;QACnC,8FAA8F;QAC9F,wGAAwG;QACxG,oEAAoE;QACpE,UAAU,CAAC;YACT,cAAc,CAAC,aAAa,CAAC,cAAc,CAAC,KAAI,CAAC,EAAE,KAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,0CAAoB,GAApB;QACE,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;IAED,4BAAM,GAAN;QACE,OAAO,KAAC,uBAAuB,eAAK,IAAI,CAAC,KAAK,UAAI,CAAC;IACrD,CAAC;IACH,kBAAC;AAAD,CAAC,AAlBD,CAAiC,KAAK,CAAC,SAAS,GAkB/C;;AAED,IAAM,uBAAuB,GAAG,sBAAsB,CAAC,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,55 @@
1
+ /*
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: MIT-0
4
+ */
5
+ import { NativeModules, NativeEventEmitter } from 'react-native';
6
+ /**
7
+ * These are the function that will be called from native side
8
+ * i.e. Native -> React Native
9
+ *
10
+ * NativeEventEmitter.onMeetingStart(meetingName)
11
+ * NativeEventEmitter.onMeetingEnd()
12
+ * NativeEventEmitter.onAttendeesJoin(attendeeInfo)
13
+ * NativeEventEmitter.onAttendeesLeave(attendeeInfo)
14
+ * NativeEventEmitter.onAddVideoTile(tileState)
15
+ * NativeEventEmitter.onRemoveVideoTile(tileState)
16
+ * NativeEventEmitter.onError(errorMessage)
17
+ */
18
+ var _eventEmitter = new NativeEventEmitter(NativeModules.NativeMobileSDKBridge);
19
+ export var MobileSDKEvent = {
20
+ OnMeetingStart: 'OnMeetingStart',
21
+ OnMeetingEnd: 'OnMeetingEnd',
22
+ OnAttendeesJoin: 'OnAttendeesJoin',
23
+ OnAttendeesLeave: 'OnAttendeesLeave',
24
+ OnAttendeesMute: 'OnAttendeesMute',
25
+ OnAttendeesUnmute: 'OnAttendeesUnmute',
26
+ OnAddVideoTile: 'OnAddVideoTile',
27
+ OnRemoveVideoTile: 'OnRemoveVideoTile',
28
+ OnError: 'OnError',
29
+ };
30
+ export var MeetingError = {
31
+ OnMaximumConcurrentVideoReached: "OnMaximumConcurrentVideoReached"
32
+ };
33
+ export function getSDKEventEmitter() {
34
+ return _eventEmitter;
35
+ }
36
+ /**
37
+ * These are functions available for React native to call on native
38
+ * i.e. React Native -> Native
39
+ *
40
+ * NativeModules.NativeMobileSDKBridge.startMeeting(meetingId, userName)
41
+ * NativeModules.NativeMobileSDKBridge.stopMeeting()
42
+ * NativeModules.NativeMobileSDKBridge.setMute(isMute) -> boolean
43
+ * NativeModules.NativeMobileSDKBridge.setCameraOn(isOn) -> boolean
44
+ * NativeModules.NativeMobileSDKBridge.bindVideoView(reactTagId, tileId)
45
+ * NativeModules.NativeMobileSDKBridge.unbindVideoView(reactTagId, tileId)
46
+ */
47
+ export var NativeFunction = {
48
+ startMeeting: NativeModules.NativeMobileSDKBridge.startMeeting,
49
+ stopMeeting: NativeModules.NativeMobileSDKBridge.stopMeeting,
50
+ setMute: NativeModules.NativeMobileSDKBridge.setMute,
51
+ setCameraOn: NativeModules.NativeMobileSDKBridge.setCameraOn,
52
+ bindVideoView: NativeModules.NativeMobileSDKBridge.bindVideoView,
53
+ unbindVideoView: NativeModules.NativeMobileSDKBridge.unbindVideoView,
54
+ };
55
+ //# sourceMappingURL=bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../../src/native/bridge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,IAAM,aAAa,GAAG,IAAI,kBAAkB,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAElF,MAAM,CAAC,IAAM,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;AAED,MAAM,CAAC,IAAM,YAAY,GAAG;IAC1B,+BAA+B,EAAE,iCAAiC;CACnE,CAAA;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,IAAM,cAAc,GAAG;IAC5B,YAAY,EAAE,aAAa,CAAC,qBAAqB,CAAC,YAAY;IAC9D,WAAW,EAAE,aAAa,CAAC,qBAAqB,CAAC,WAAW;IAC5D,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,OAAO;IACpD,WAAW,EAAE,aAAa,CAAC,qBAAqB,CAAC,WAAW;IAC5D,aAAa,EAAE,aAAa,CAAC,qBAAqB,CAAC,aAAa;IAChE,eAAe,EAAE,aAAa,CAAC,qBAAqB,CAAC,eAAe;CACrE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/video-chat",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -33,13 +33,13 @@
33
33
  "@fontsource/roboto": "^4.5.1",
34
34
  "@mui/icons-material": "^5.0.1",
35
35
  "@mui/material": "^5.0.2",
36
- "@tellescope/constants": "^0.0.13",
37
- "@tellescope/react-components": "^0.0.13",
38
- "@tellescope/sdk": "^0.0.13",
39
- "@tellescope/types-client": "^0.0.13",
40
- "@tellescope/types-models": "^0.0.13",
41
- "@tellescope/types-utilities": "^0.0.13",
42
- "@tellescope/utilities": "^0.0.13",
36
+ "@tellescope/constants": "^0.0.14",
37
+ "@tellescope/react-components": "^0.0.14",
38
+ "@tellescope/sdk": "^0.0.14",
39
+ "@tellescope/types-client": "^0.0.14",
40
+ "@tellescope/types-models": "^0.0.14",
41
+ "@tellescope/types-utilities": "^0.0.14",
42
+ "@tellescope/utilities": "^0.0.14",
43
43
  "@typescript-eslint/eslint-plugin": "^4.33.0",
44
44
  "@typescript-eslint/parser": "^4.33.0",
45
45
  "amazon-chime-sdk-component-library-react": "^2.12.0",
@@ -54,7 +54,7 @@
54
54
  "react": "^17.0.2",
55
55
  "react-dom": "^17.0.2"
56
56
  },
57
- "gitHead": "1eb38568bd39b941e6b4a2bad9e3b33841c26b39",
57
+ "gitHead": "b57352502a35237c417fa4d5f571f0bb0aa07be2",
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: MIT-0
4
+ */
5
+
6
+ import PropTypes from 'prop-types';
7
+ import React from 'react';
8
+ import { requireNativeComponent, findNodeHandle, ViewStyle } from 'react-native';
9
+ import { NativeFunction } from './bridge';
10
+
11
+ export class RNVideoView extends React.Component<{ tileId: string | number, style: ViewStyle }> {
12
+ componentDidMount() {
13
+ // we need to delay the bind video
14
+ // Because "componentDidMount" will be called "immediately after the initial rendering occurs"
15
+ // This is *before* RCTUIManager add this view to register (so that viewForReactTag() can return a view)
16
+ // So we need to dispatch bindVideoView after this function complete
17
+ setTimeout(() => {
18
+ NativeFunction.bindVideoView(findNodeHandle(this), this.props.tileId);
19
+ });
20
+ }
21
+
22
+ componentWillUnmount() {
23
+ NativeFunction.unbindVideoView(this.props.tileId);
24
+ }
25
+
26
+ render() {
27
+ return <RNVideoRenderViewNative {...this.props} />;
28
+ }
29
+ }
30
+
31
+ const RNVideoRenderViewNative = requireNativeComponent('RNVideoView');
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: MIT-0
4
+ */
5
+
6
+ import { NativeModules, NativeEventEmitter } from 'react-native';
7
+
8
+ /**
9
+ * These are the function that will be called from native side
10
+ * i.e. Native -> React Native
11
+ *
12
+ * NativeEventEmitter.onMeetingStart(meetingName)
13
+ * NativeEventEmitter.onMeetingEnd()
14
+ * NativeEventEmitter.onAttendeesJoin(attendeeInfo)
15
+ * NativeEventEmitter.onAttendeesLeave(attendeeInfo)
16
+ * NativeEventEmitter.onAddVideoTile(tileState)
17
+ * NativeEventEmitter.onRemoveVideoTile(tileState)
18
+ * NativeEventEmitter.onError(errorMessage)
19
+ */
20
+ const _eventEmitter = new NativeEventEmitter(NativeModules.NativeMobileSDKBridge);
21
+
22
+ export const 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
+
34
+ export const MeetingError = {
35
+ OnMaximumConcurrentVideoReached: "OnMaximumConcurrentVideoReached"
36
+ }
37
+
38
+ export function getSDKEventEmitter() {
39
+ return _eventEmitter;
40
+ }
41
+
42
+ /**
43
+ * These are functions available for React native to call on native
44
+ * i.e. React Native -> Native
45
+ *
46
+ * NativeModules.NativeMobileSDKBridge.startMeeting(meetingId, userName)
47
+ * NativeModules.NativeMobileSDKBridge.stopMeeting()
48
+ * NativeModules.NativeMobileSDKBridge.setMute(isMute) -> boolean
49
+ * NativeModules.NativeMobileSDKBridge.setCameraOn(isOn) -> boolean
50
+ * NativeModules.NativeMobileSDKBridge.bindVideoView(reactTagId, tileId)
51
+ * NativeModules.NativeMobileSDKBridge.unbindVideoView(reactTagId, tileId)
52
+ */
53
+ export const NativeFunction = {
54
+ startMeeting: NativeModules.NativeMobileSDKBridge.startMeeting,
55
+ stopMeeting: NativeModules.NativeMobileSDKBridge.stopMeeting,
56
+ setMute: NativeModules.NativeMobileSDKBridge.setMute,
57
+ setCameraOn: NativeModules.NativeMobileSDKBridge.setCameraOn,
58
+ bindVideoView: NativeModules.NativeMobileSDKBridge.bindVideoView,
59
+ unbindVideoView: NativeModules.NativeMobileSDKBridge.unbindVideoView,
60
+ }