@tellescope/video-chat 1.18.2 → 1.19.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/video-chat",
3
- "version": "1.18.2",
3
+ "version": "1.19.0",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -34,13 +34,13 @@
34
34
  "@fontsource/roboto": "^4.5.1",
35
35
  "@mui/icons-material": "^5.0.1",
36
36
  "@mui/material": "^5.0.2",
37
- "@tellescope/constants": "^1.18.2",
38
- "@tellescope/react-components": "^1.18.2",
39
- "@tellescope/sdk": "^1.18.2",
40
- "@tellescope/types-client": "^1.18.2",
41
- "@tellescope/types-models": "^1.18.2",
37
+ "@tellescope/constants": "^1.19.0",
38
+ "@tellescope/react-components": "^1.19.0",
39
+ "@tellescope/sdk": "^1.19.0",
40
+ "@tellescope/types-client": "^1.19.0",
41
+ "@tellescope/types-models": "^1.19.0",
42
42
  "@tellescope/types-utilities": "^1.5.1",
43
- "@tellescope/utilities": "^1.18.2",
43
+ "@tellescope/utilities": "^1.19.0",
44
44
  "@typescript-eslint/eslint-plugin": "^4.33.0",
45
45
  "@typescript-eslint/parser": "^4.33.0",
46
46
  "amazon-chime-sdk-component-library-react": "^2.15.0",
@@ -55,7 +55,7 @@
55
55
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
56
56
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
57
57
  },
58
- "gitHead": "50e6f7bbe6e59a4b87d91e0b2bc6a007eb85982b",
58
+ "gitHead": "bd06f508b9e25d7dfa2b4e97b99c75a97486a33b",
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  }
package/src/controls.tsx CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  Flex,
12
12
  Paper,
13
13
  Styled,
14
+ Button,
14
15
  } from "@tellescope/react-components"
15
16
  import { CurrentCallContext } from "./video_shared"
16
17
  import { useStartVideoCall } from "./video"
@@ -45,12 +46,15 @@ export const EndMeeting = ({ size=DEFAULT_BUTTON_SIZE, onLeave }: ButtonProps &
45
46
  const { endMeeting } = useStartVideoCall()
46
47
 
47
48
  return (
48
- <LabeledIconButton size={size} Icon={CallEndIcon} label="End Meeting"
49
- onClick={() => {
50
- endMeeting()
49
+ <Button variant="outlined" color="primary"
50
+ style={{ width: 200 }}
51
+ onClick={() => {
51
52
  onLeave?.()
52
- }}
53
- />
53
+ endMeeting()
54
+ }}
55
+ >
56
+ End Meeting for All
57
+ </Button>
54
58
  )
55
59
  }
56
60
 
@@ -60,11 +64,12 @@ interface LeaveMeetingProps {
60
64
  export const LeaveMeeting = ({ onLeave, size=DEFAULT_BUTTON_SIZE } : LeaveMeetingProps & ButtonProps) => {
61
65
  const { leaveMeeting } = useJoinVideoCall()
62
66
 
67
+
63
68
  return (
64
- <LabeledIconButton size={size} Icon={CallEndIcon} label="Leave Meeting"
65
- onClick={() => {
66
- onLeave?.()
69
+ <LabeledIconButton size={size} Icon={CallEndIcon} label="Leave Meeting"
70
+ onClick={() => {
67
71
  leaveMeeting()
72
+ onLeave?.()
68
73
  }}
69
74
  />
70
75
  )
@@ -73,8 +78,9 @@ export const LeaveMeeting = ({ onLeave, size=DEFAULT_BUTTON_SIZE } : LeaveMeetin
73
78
  interface ControlbarProps {
74
79
  spacing?: number,
75
80
  size?: number,
81
+ showEndMeeting?: boolean
76
82
  }
77
- export const ControlBar = ({ onLeave, style, spacing=15, size } : ControlbarProps & LeaveMeetingProps & Styled) => {
83
+ export const ControlBar = ({ onLeave, style, spacing=15, size, showEndMeeting, } : ControlbarProps & LeaveMeetingProps & Styled) => {
78
84
  const { isHost } = React.useContext(CurrentCallContext)
79
85
  const itemStyle = { marginLeft: spacing, marginRight: spacing }
80
86
 
@@ -88,8 +94,13 @@ export const ControlBar = ({ onLeave, style, spacing=15, size } : ControlbarProp
88
94
  <MicrophoneToggle size={size}/>
89
95
  </Flex>
90
96
  <Flex style={itemStyle}>
91
- {isHost ? <EndMeeting size={size} onLeave={onLeave}/> : <LeaveMeeting size={size} onLeave={onLeave}/>}
97
+ <LeaveMeeting size={size} onLeave={onLeave}/>
92
98
  </Flex>
99
+ {(isHost || showEndMeeting) &&
100
+ <Flex style={{ marginLeft: 30, marginRight: 20 }}>
101
+ <EndMeeting size={size} onLeave={onLeave} />
102
+ </Flex>
103
+ }
93
104
  </Paper>
94
105
  </Flex>
95
106
  )
package/src/video.tsx CHANGED
@@ -119,9 +119,6 @@ export const useJoinMeeting = () => {
119
119
  }
120
120
 
121
121
  const joinMeeting = useCallback(async (meeting: Meeting) => {
122
- setMeeting(meeting.meetingInfo.Meeting)
123
- setIsHost(meeting.creator === session.userInfo.id)
124
-
125
122
  let attendeeInfo = meeting.attendees.find(a => a.id === session.userInfo.id)?.info
126
123
  if (!attendeeInfo) {
127
124
  const calendarEventId = meeting.calendarEventId
@@ -143,6 +140,8 @@ export const useJoinMeeting = () => {
143
140
  }); // Use the join API to create a meeting session
144
141
  await meetingManager.start(); // At this point you can let users setup their devices, or start the session immediately
145
142
 
143
+ setMeeting(meeting.meetingInfo.Meeting)
144
+ setIsHost(meeting.creator === session.userInfo.id)
146
145
  }, [setMeeting, meetingManager, setMeeting, setIsHost])
147
146
 
148
147
  return {