@tellescope/video-chat 0.0.19 → 0.0.23
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/controls.d.ts.map +1 -1
- package/lib/cjs/controls.js +4 -3
- package/lib/cjs/controls.js.map +1 -1
- package/lib/cjs/video.d.ts +3 -28
- package/lib/cjs/video.d.ts.map +1 -1
- package/lib/cjs/video.js +8 -8
- package/lib/cjs/video.js.map +1 -1
- package/lib/cjs/video.native.d.ts +1 -1
- package/lib/cjs/video.native.d.ts.map +1 -1
- package/lib/cjs/video.native.js +9 -9
- package/lib/cjs/video.native.js.map +1 -1
- package/lib/cjs/video_shared.d.ts +49 -0
- package/lib/cjs/video_shared.d.ts.map +1 -0
- package/lib/cjs/video_shared.js +9 -0
- package/lib/cjs/video_shared.js.map +1 -0
- package/lib/esm/controls.d.ts.map +1 -1
- package/lib/esm/controls.js +2 -1
- package/lib/esm/controls.js.map +1 -1
- package/lib/esm/video.d.ts +3 -28
- package/lib/esm/video.d.ts.map +1 -1
- package/lib/esm/video.js +3 -3
- package/lib/esm/video.js.map +1 -1
- package/lib/esm/video.native.d.ts +1 -1
- package/lib/esm/video.native.d.ts.map +1 -1
- package/lib/esm/video.native.js +4 -3
- package/lib/esm/video.native.js.map +1 -1
- package/lib/esm/video_shared.d.ts +49 -0
- package/lib/esm/video_shared.d.ts.map +1 -0
- package/lib/esm/video_shared.js +3 -0
- package/lib/esm/video_shared.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/controls.tsx +2 -4
- package/src/video.native.tsx +3 -8
- package/src/video.tsx +11 -22
- package/src/video_shared.tsx +48 -0
- package/lib/esm/shared.d.ts +0 -1
- package/lib/esm/shared.d.ts.map +0 -1
- package/lib/esm/shared.js +0 -2
- package/lib/esm/shared.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/video-chat",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
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.
|
|
37
|
-
"@tellescope/react-components": "^0.0.
|
|
38
|
-
"@tellescope/sdk": "^0.0.
|
|
39
|
-
"@tellescope/types-client": "^0.0.
|
|
40
|
-
"@tellescope/types-models": "^0.0.
|
|
41
|
-
"@tellescope/types-utilities": "^0.0.
|
|
42
|
-
"@tellescope/utilities": "^0.0.
|
|
36
|
+
"@tellescope/constants": "^0.0.23",
|
|
37
|
+
"@tellescope/react-components": "^0.0.23",
|
|
38
|
+
"@tellescope/sdk": "^0.0.23",
|
|
39
|
+
"@tellescope/types-client": "^0.0.23",
|
|
40
|
+
"@tellescope/types-models": "^0.0.23",
|
|
41
|
+
"@tellescope/types-utilities": "^0.0.23",
|
|
42
|
+
"@tellescope/utilities": "^0.0.23",
|
|
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": "
|
|
57
|
+
"gitHead": "da81cccdf2fcf06080a5a7d33e0a1cdac9f05a40",
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
}
|
package/src/controls.tsx
CHANGED
|
@@ -14,10 +14,8 @@ import {
|
|
|
14
14
|
} from "@tellescope/react-components/lib/esm/mui"
|
|
15
15
|
import { LabeledIconButton } from "@tellescope/react-components/lib/esm/controls"
|
|
16
16
|
import { Flex } from "@tellescope/react-components/lib/esm/layout"
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
useStartVideoCall,
|
|
20
|
-
} from "./video"
|
|
17
|
+
import { CurrentCallContext } from "./video_shared"
|
|
18
|
+
import { useStartVideoCall } from "./video"
|
|
21
19
|
|
|
22
20
|
const DEFAULT_BUTTON_SIZE = 30
|
|
23
21
|
interface ButtonProps {
|
package/src/video.native.tsx
CHANGED
|
@@ -20,12 +20,7 @@ import { Flex } from "@tellescope/react-components/lib/esm/layout"
|
|
|
20
20
|
import {
|
|
21
21
|
Button,
|
|
22
22
|
Typography,
|
|
23
|
-
convert_CSS_to_RNStyles,
|
|
24
|
-
|
|
25
|
-
VideoIcon,
|
|
26
|
-
VideoOffIcon,
|
|
27
|
-
MicrophoneIcon,
|
|
28
|
-
MicrophoneOffIcon,
|
|
23
|
+
convert_CSS_to_RNStyles, // requires mui.native
|
|
29
24
|
} from "@tellescope/react-components/lib/esm/mui.native"
|
|
30
25
|
|
|
31
26
|
import {
|
|
@@ -35,7 +30,7 @@ import {
|
|
|
35
30
|
VideoProps,
|
|
36
31
|
AttendeeDisplayInfo,
|
|
37
32
|
VideoViewProps,
|
|
38
|
-
} from "./
|
|
33
|
+
} from "./video_shared"
|
|
39
34
|
|
|
40
35
|
import {
|
|
41
36
|
getSDKEventEmitter,
|
|
@@ -202,7 +197,7 @@ export const useStartVideoCall = (): StartVideoCallReturnType => {
|
|
|
202
197
|
session.api.meetings.add_attendees_to_meeting({ id: meeting.Meeting.ExternalMeetingId, attendees: initialAttendees })
|
|
203
198
|
}
|
|
204
199
|
|
|
205
|
-
NativeFunction.startMeeting(meeting.Meeting, host.Attendee)
|
|
200
|
+
NativeFunction.startMeeting(meeting.Meeting, host.info.Attendee)
|
|
206
201
|
|
|
207
202
|
setMeeting(meeting.Meeting)
|
|
208
203
|
setIsHost(true)
|
package/src/video.tsx
CHANGED
|
@@ -35,23 +35,15 @@ import {
|
|
|
35
35
|
// useRemoteVideoTileState,
|
|
36
36
|
// useContentShareControls, // screen sharing
|
|
37
37
|
} from 'amazon-chime-sdk-component-library-react';
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
localTileId: number | null,
|
|
48
|
-
isHost: boolean, setIsHost: (b: boolean) => void;
|
|
49
|
-
videoTiles: (number)[],
|
|
50
|
-
})
|
|
51
|
-
export interface VideoProps {
|
|
52
|
-
children?: React.ReactNode,
|
|
53
|
-
theme?: typeof darkTheme,
|
|
54
|
-
}
|
|
38
|
+
|
|
39
|
+
import {
|
|
40
|
+
CurrentCallContext,
|
|
41
|
+
|
|
42
|
+
AttendeeDisplayInfo,
|
|
43
|
+
VideoProps,
|
|
44
|
+
VideoViewProps,
|
|
45
|
+
} from "./video_shared"
|
|
46
|
+
|
|
55
47
|
const WithContext = ({ children } : { children: React.ReactNode }) => {
|
|
56
48
|
const [meeting, setMeeting] = useState(undefined as MeetingInfo | undefined)
|
|
57
49
|
const [isHost, setIsHost] = useState(false)
|
|
@@ -85,8 +77,8 @@ const WithContext = ({ children } : { children: React.ReactNode }) => {
|
|
|
85
77
|
</CurrentCallContext.Provider>
|
|
86
78
|
)
|
|
87
79
|
}
|
|
88
|
-
export const WithVideo = ({ children
|
|
89
|
-
<ThemeProvider theme={
|
|
80
|
+
export const WithVideo = ({ children }: VideoProps) => (
|
|
81
|
+
<ThemeProvider theme={darkTheme}>
|
|
90
82
|
<MeetingProvider>
|
|
91
83
|
<WithContext>
|
|
92
84
|
{children}
|
|
@@ -161,9 +153,6 @@ export const useJoinVideoCall = () => {
|
|
|
161
153
|
}
|
|
162
154
|
export type JoinVideoCallReturnType = ReturnType<typeof useJoinVideoCall>
|
|
163
155
|
|
|
164
|
-
export interface VideoViewProps {
|
|
165
|
-
style?: CSSProperties,
|
|
166
|
-
}
|
|
167
156
|
export const SelfView = ({ style }: VideoViewProps) => <div style={style}><LocalVideo/></div>
|
|
168
157
|
|
|
169
158
|
export const useRemoteViews = (props={} as VideoViewProps) => {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { CSSProperties } from "react"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AttendeeInfo,
|
|
5
|
+
MeetingInfo,
|
|
6
|
+
} from '@tellescope/types-models'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
UserIdentity,
|
|
10
|
+
} from '@tellescope/types-utilities'
|
|
11
|
+
|
|
12
|
+
export type AttendeeDisplayInfo = { attendeeId: string, externalUserId: string }
|
|
13
|
+
export interface CallContext {
|
|
14
|
+
meeting: MeetingInfo | undefined, setMeeting: (m: MeetingInfo | undefined) => void,
|
|
15
|
+
videoIsEnabled: boolean, toggleVideo: () => Promise<void>,
|
|
16
|
+
microphoneIsEnabled: boolean, toggleMicrophone: () => Promise<void>,
|
|
17
|
+
attendees: AttendeeDisplayInfo[], shareScreenId: number | null,
|
|
18
|
+
localTileId: number | null,
|
|
19
|
+
isHost: boolean, setIsHost: (b: boolean) => void;
|
|
20
|
+
videoTiles: (number)[],
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const CurrentCallContext = React.createContext({} as CallContext)
|
|
24
|
+
export interface VideoProps {
|
|
25
|
+
children?: React.ReactNode,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface VideoViewProps {
|
|
29
|
+
style?: CSSProperties,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface JoinVideoCallReturnType {
|
|
33
|
+
meeting: CallContext['meeting'],
|
|
34
|
+
videoIsEnabled: CallContext['videoIsEnabled'],
|
|
35
|
+
toggleVideo: CallContext['toggleVideo'],
|
|
36
|
+
joinMeeting: (meetingInfo: { Meeting: MeetingInfo }, attendeeInfo: { Attendee: AttendeeInfo }) => Promise<void>,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface StartVideoCallReturnType {
|
|
40
|
+
starting: boolean,
|
|
41
|
+
ending: boolean,
|
|
42
|
+
meeting: CallContext['meeting'],
|
|
43
|
+
videoIsEnabled: CallContext['videoIsEnabled'],
|
|
44
|
+
toggleVideo: CallContext['toggleVideo'],
|
|
45
|
+
createAndStartMeeting: (initialAttendees?: UserIdentity[]) => Promise<void>,
|
|
46
|
+
addAttendees: (attendees: UserIdentity[]) => Promise<void>,
|
|
47
|
+
endMeeting: () => Promise<void>,
|
|
48
|
+
}
|
package/lib/esm/shared.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=shared.d.ts.map
|
package/lib/esm/shared.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/shared.ts"],"names":[],"mappings":""}
|
package/lib/esm/shared.js
DELETED
package/lib/esm/shared.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/shared.ts"],"names":[],"mappings":""}
|