@naviedu/room-platform-react 0.0.27 → 0.0.29

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 (3) hide show
  1. package/index.d.ts +18 -3
  2. package/index.esm.js +282 -226
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -59,7 +59,7 @@ export declare function RoomActionButton({ icon, state, ...props }: ComponentPro
59
59
 
60
60
  declare type RoomActionName = (typeof roomActionNames)[number];
61
61
 
62
- declare const roomActionNames: readonly [RoomPlatformAction.PRIVATE_ROOM_INVITE, RoomPlatformAction.PRIVATE_ROOM_RESPOND, RoomPlatformAction.PRIVATE_ROOM_CLOSE, RoomPlatformAction.PRIVATE_ROOM_SCREEN_SHARE_START, RoomPlatformAction.PRIVATE_ROOM_SCREEN_SHARE_STOP, RoomPlatformAction.MONITOR_START, RoomPlatformAction.MONITOR_STOP, RoomPlatformAction.MODERATION_MUTE, RoomPlatformAction.MODERATION_REMOVE, RoomPlatformAction.MODERATION_LOWER_HAND, RoomPlatformAction.WHITEBOARD_CLEAR, RoomPlatformAction.SPEAK_REQUEST, RoomPlatformAction.SPEAK_CANCEL, RoomPlatformAction.SPEAK_APPROVE, RoomPlatformAction.SPEAK_REJECT, RoomPlatformAction.SPEAKER_SET, RoomPlatformAction.SPEAKER_CLEAR];
62
+ declare const roomActionNames: readonly [RoomPlatformAction.PRIVATE_ROOM_INVITE, RoomPlatformAction.PRIVATE_ROOM_RESPOND, RoomPlatformAction.PRIVATE_ROOM_CLOSE, RoomPlatformAction.PRIVATE_ROOM_SCREEN_SHARE_START, RoomPlatformAction.PRIVATE_ROOM_SCREEN_SHARE_STOP, RoomPlatformAction.MONITOR_START, RoomPlatformAction.MONITOR_STOP, RoomPlatformAction.MODERATION_MUTE, RoomPlatformAction.MODERATION_REMOVE, RoomPlatformAction.MODERATION_LOWER_HAND, RoomPlatformAction.WHITEBOARD_CLEAR, RoomPlatformAction.SPEAK_REQUEST, RoomPlatformAction.SPEAK_CANCEL, RoomPlatformAction.SPEAK_APPROVE, RoomPlatformAction.SPEAK_REJECT, RoomPlatformAction.SPEAKER_SET, RoomPlatformAction.SPEAKER_CLEAR, RoomPlatformAction.MODE_SET];
63
63
 
64
64
  export declare type RoomActionState = {
65
65
  label: string;
@@ -69,6 +69,7 @@ export declare type RoomActionState = {
69
69
 
70
70
  declare interface RoomControlState {
71
71
  revision: string;
72
+ mode: string;
72
73
  raisedHandParticipantIdentities: string[];
73
74
  activeSpeakerParticipantIdentity?: string;
74
75
  monitorActive: boolean;
@@ -155,7 +156,8 @@ declare enum RoomPlatformAction {
155
156
  SPEAK_APPROVE = "speak.approve",
156
157
  SPEAK_REJECT = "speak.reject",
157
158
  SPEAKER_SET = "speaker.set",
158
- SPEAKER_CLEAR = "speaker.clear"
159
+ SPEAKER_CLEAR = "speaker.clear",
160
+ MODE_SET = "room.mode.set"
159
161
  }
160
162
 
161
163
  export declare type RoomPlatformActionName = RoomActionName;
@@ -198,6 +200,7 @@ declare const RoomPlatformCapability: {
198
200
  readonly MEDIA_PUBLISH_AUDIO: "media:publish_audio";
199
201
  readonly MEDIA_PUBLISH_VIDEO: "media:publish_video";
200
202
  readonly MEDIA_SHARE_SCREEN: "media:share_screen";
203
+ readonly ROOM_SET_MODE: "room:set_mode";
201
204
  readonly DATA_PUBLISH: "data:publish";
202
205
  readonly ROOM_SPEAK_REQUEST: "room:speak_request";
203
206
  readonly ROOM_MODERATE: "room:moderate";
@@ -327,6 +330,7 @@ export declare type RoomPlatformExtensionProps = {
327
330
  actions: RoomPlatformActions;
328
331
  capabilities: readonly RoomPlatformCapabilityName[];
329
332
  connectionStatus: RoomPlatformConnectionStatus;
333
+ currentMode: string;
330
334
  currentParticipant?: RoomParticipantPresence;
331
335
  presentation: RoomPlatformPresentation;
332
336
  roomId?: string;
@@ -401,6 +405,17 @@ export declare function RoomPlatformLocalPreview({ trackRef, localPreviewTrack,
401
405
 
402
406
  export declare function RoomPlatformMediaRuntime({ children }: PropsWithChildren): JSX.Element;
403
407
 
408
+ export declare type RoomPlatformModeConfig = {
409
+ modes?: readonly {
410
+ key: string;
411
+ label: string;
412
+ }[];
413
+ beforeModeChange?: (input: {
414
+ from: string;
415
+ to: string;
416
+ }) => boolean | Promise<boolean>;
417
+ };
418
+
404
419
  export declare function RoomPlatformMonitorSidebarVideoTile(props: RoomPlatformMonitorSidebarVideoTileProps): JSX.Element;
405
420
 
406
421
  export declare type RoomPlatformMonitorSidebarVideoTileProps = Omit<RoomPlatformMonitorVideoTileProps, 'testId'> & {
@@ -565,7 +580,7 @@ export declare type RoomPlatformRoomProps = {
565
580
  completionAction?: RoomPlatformCompletionActionConfig;
566
581
  extensions?: RoomPlatformExtensions;
567
582
  launchToken: string;
568
- isPracticeMode?: boolean;
583
+ modeConfig?: RoomPlatformModeConfig;
569
584
  shadowDom?: boolean;
570
585
  sizing?: RoomPlatformSizing;
571
586
  onError?: (event: RoomPlatformErrorEvent) => void;