@tellescope/video-chat 0.0.17 → 0.0.21

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.
Files changed (43) hide show
  1. package/lib/cjs/controls.d.ts.map +1 -1
  2. package/lib/cjs/controls.js +4 -3
  3. package/lib/cjs/controls.js.map +1 -1
  4. package/lib/cjs/native/bridge.d.ts.map +1 -1
  5. package/lib/cjs/native/bridge.js +0 -1
  6. package/lib/cjs/native/bridge.js.map +1 -1
  7. package/lib/cjs/video.d.ts +3 -28
  8. package/lib/cjs/video.d.ts.map +1 -1
  9. package/lib/cjs/video.js +8 -8
  10. package/lib/cjs/video.js.map +1 -1
  11. package/lib/cjs/video.native.d.ts +1 -1
  12. package/lib/cjs/video.native.d.ts.map +1 -1
  13. package/lib/cjs/video.native.js +8 -8
  14. package/lib/cjs/video.native.js.map +1 -1
  15. package/lib/cjs/video_shared.d.ts +49 -0
  16. package/lib/cjs/video_shared.d.ts.map +1 -0
  17. package/lib/cjs/video_shared.js +9 -0
  18. package/lib/cjs/video_shared.js.map +1 -0
  19. package/lib/esm/controls.d.ts.map +1 -1
  20. package/lib/esm/controls.js +2 -1
  21. package/lib/esm/controls.js.map +1 -1
  22. package/lib/esm/native/bridge.d.ts.map +1 -1
  23. package/lib/esm/native/bridge.js +0 -1
  24. package/lib/esm/native/bridge.js.map +1 -1
  25. package/lib/esm/video.d.ts +3 -28
  26. package/lib/esm/video.d.ts.map +1 -1
  27. package/lib/esm/video.js +3 -3
  28. package/lib/esm/video.js.map +1 -1
  29. package/lib/esm/video.native.d.ts +1 -1
  30. package/lib/esm/video.native.d.ts.map +1 -1
  31. package/lib/esm/video.native.js +3 -2
  32. package/lib/esm/video.native.js.map +1 -1
  33. package/lib/esm/video_shared.d.ts +49 -0
  34. package/lib/esm/video_shared.d.ts.map +1 -0
  35. package/lib/esm/video_shared.js +3 -0
  36. package/lib/esm/video_shared.js.map +1 -0
  37. package/lib/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +9 -9
  39. package/src/controls.tsx +2 -4
  40. package/src/native/bridge.ts +0 -1
  41. package/src/video.native.tsx +2 -7
  42. package/src/video.tsx +11 -22
  43. package/src/video_shared.tsx +48 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/video-chat",
3
- "version": "0.0.17",
3
+ "version": "0.0.21",
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.17",
37
- "@tellescope/react-components": "^0.0.17",
38
- "@tellescope/sdk": "^0.0.17",
39
- "@tellescope/types-client": "^0.0.17",
40
- "@tellescope/types-models": "^0.0.17",
41
- "@tellescope/types-utilities": "^0.0.17",
42
- "@tellescope/utilities": "^0.0.17",
36
+ "@tellescope/constants": "^0.0.21",
37
+ "@tellescope/react-components": "^0.0.21",
38
+ "@tellescope/sdk": "^0.0.21",
39
+ "@tellescope/types-client": "^0.0.21",
40
+ "@tellescope/types-models": "^0.0.21",
41
+ "@tellescope/types-utilities": "^0.0.21",
42
+ "@tellescope/utilities": "^0.0.21",
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": "4f6785b4e580de4f3fceb9bc3d455cc7191cd094",
57
+ "gitHead": "67131e18cc6f5aeafbb9dedb437fd915d33be1dc",
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
- CurrentCallContext,
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 {
@@ -17,7 +17,6 @@ import { NativeModules, NativeEventEmitter } from 'react-native';
17
17
  * NativeEventEmitter.onRemoveVideoTile(tileState)
18
18
  * NativeEventEmitter.onError(errorMessage)
19
19
  */
20
- console.log(NativeModules)
21
20
  const _eventEmitter = new NativeEventEmitter(NativeModules.NativeMobileSDKBridge);
22
21
 
23
22
  export const MobileSDKEvent = {
@@ -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 "./video.js"
33
+ } from "./video_shared"
39
34
 
40
35
  import {
41
36
  getSDKEventEmitter,
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
- import { } from "../../../types-client/node_modules/@tellescope/types-models/src"
39
-
40
- export type AttendeeDisplayInfo = { attendeeId: string, externalUserId: string }
41
-
42
- export const CurrentCallContext = React.createContext({} as {
43
- meeting: MeetingInfo | undefined, setMeeting: (m: MeetingInfo | undefined) => void,
44
- videoIsEnabled: boolean, toggleVideo: () => Promise<void>,
45
- microphoneIsEnabled: boolean, toggleMicrophone: () => Promise<void>,
46
- attendees: AttendeeDisplayInfo[], shareScreenId: number | null,
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, theme=darkTheme }: VideoProps) => (
89
- <ThemeProvider theme={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
+ }