@tellescope/video-chat 1.3.21 → 1.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/video-chat",
3
- "version": "1.3.21",
3
+ "version": "1.3.23",
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.3.20",
38
- "@tellescope/react-components": "^1.3.21",
39
- "@tellescope/sdk": "^1.3.21",
40
- "@tellescope/types-client": "^1.3.20",
41
- "@tellescope/types-models": "^1.3.20",
37
+ "@tellescope/constants": "^1.3.23",
38
+ "@tellescope/react-components": "^1.3.23",
39
+ "@tellescope/sdk": "^1.3.23",
40
+ "@tellescope/types-client": "^1.3.23",
41
+ "@tellescope/types-models": "^1.3.23",
42
42
  "@tellescope/types-utilities": "^1.3.20",
43
- "@tellescope/utilities": "^1.3.20",
43
+ "@tellescope/utilities": "^1.3.23",
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": "845e7199208a281a8e6b80f84510cf9870a5413a",
58
+ "gitHead": "23050ae45de66ab1b293ee02d7f98e46b85ea0e6",
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  }
package/src/hooks.ts CHANGED
@@ -46,10 +46,25 @@ export const useJoinMeeting = () => {
46
46
  const joinMeeting = useCallback(async (meeting: Meeting) => {
47
47
  setMeeting(meeting.meetingInfo.Meeting)
48
48
  setIsHost(meeting.creator === session.userInfo.id)
49
+
50
+ let attendeeInfo = meeting.attendees.find(a => a.id === session.userInfo.id)?.info
51
+ if (!attendeeInfo) {
52
+ const calendarEventId = meeting.calendarEventId
53
+ if (calendarEventId) {
54
+ const result = await session.api.meetings.join_meeting_for_event({ calendarEventId })
55
+
56
+ attendeeInfo = result.attendee.info
57
+ }
58
+
59
+ if (!attendeeInfo) {
60
+ console.error("Could not find attendee info for joining meeting and failed to join")
61
+ return
62
+ }
63
+ }
49
64
 
50
65
  await meetingManager.join({
51
66
  meetingInfo: meeting.meetingInfo,
52
- attendeeInfo: meeting.attendees.find(a => a.id === session.userInfo.id)!.info
67
+ attendeeInfo,
53
68
  }); // Use the join API to create a meeting session
54
69
  await meetingManager.start(); // At this point you can let users setup their devices, or start the session immediately
55
70
 
package/src/video.tsx CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  // VideoTile,
27
27
  // PreviewVideo,
28
28
  RemoteVideo,
29
- useAttendeeAudioStatus,
29
+ // useAttendeeAudioStatus,
30
30
  LocalVideo,
31
31
  useLocalVideo,
32
32
  useMeetingManager,
@@ -176,8 +176,8 @@ export const useJoinVideoCall = (props?: JoinVideoCallProps): JoinVideoCallRetur
176
176
 
177
177
  // Stop the meeting session (audio and video)
178
178
  meetingManager.audioVideo && meetingManager.audioVideo.stop()
179
-
180
179
  }
180
+ setMeeting(undefined)
181
181
  }
182
182
 
183
183
  useEffect(() => {
@@ -18,6 +18,7 @@ export interface CallContext {
18
18
  localTileId: number | null,
19
19
  isHost: boolean, setIsHost: (b: boolean) => void;
20
20
  videoTiles: (number)[],
21
+ // leaveMeeting: () => void,
21
22
  }
22
23
 
23
24
  export const CurrentCallContext = React.createContext({} as CallContext)