@naviedu/room-platform-react 0.0.86 → 0.0.87

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/README.md CHANGED
@@ -63,6 +63,17 @@ export function Room({ launchToken }: { launchToken: string }) {
63
63
 
64
64
  `RoomPlatformProvider` is advanced composition only; a consumer using it instead of `RoomPlatformRoom` owns its own DOM and stylesheet boundary.
65
65
 
66
+ ## Camera preview mirror
67
+
68
+ The local camera preview is mirrored by default to preserve the existing local
69
+ experience. The `Lật ngang video xem trước` setting is available under
70
+ `Thiết lập` → `Thiết bị` and is stored locally; it affects only how the current
71
+ user sees their own preview.
72
+
73
+ Turning the setting off changes only the local preview. Background processor
74
+ input, remote participants, the stage, and recordings always use the original
75
+ orientation.
76
+
66
77
  ## Framework-neutral room control
67
78
 
68
79
  Use the React-free subpath when a host needs the shared room-control contracts
package/index.d.ts CHANGED
@@ -49,7 +49,7 @@ export declare function getRoomPlatformPrivateRoomStatusBanner({ privateRoom, is
49
49
  privateRoomReturnedNoticeId?: string;
50
50
  }): RoomPlatformPrivateRoomBannerState | undefined;
51
51
 
52
- export declare const monitorCameraVideoClassName = "h-full w-full object-cover -scale-x-100";
52
+ export declare const monitorCameraVideoClassName = "h-full w-full object-cover";
53
53
 
54
54
  declare type OmitUndefined<T> = T extends undefined ? never : T;
55
55
 
@@ -394,9 +394,10 @@ export declare type RoomPlatformLocalMediaKind = 'microphone' | 'camera' | 'scre
394
394
 
395
395
  declare type RoomPlatformLocalMediaState = Record<RoomPlatformLocalMediaKind, boolean>;
396
396
 
397
- export declare function RoomPlatformLocalPreview({ trackRef, localTrack, }: {
397
+ export declare function RoomPlatformLocalPreview({ trackRef, localTrack, mirrorVideoPreview, }: {
398
398
  trackRef?: TrackReference;
399
399
  localTrack?: LocalVideoTrack | null;
400
+ mirrorVideoPreview?: boolean;
400
401
  }): JSX.Element;
401
402
 
402
403
  export declare function RoomPlatformMediaRuntime({ children }: PropsWithChildren): JSX.Element;
@@ -647,7 +648,7 @@ export declare type RoomPlatformTopBarProps = {
647
648
  topBarTrailing?: ReactNode;
648
649
  };
649
650
 
650
- export declare function RoomPlatformVideoTile({ kind, label, trackRef, className, media, mediaClassName, labelPosition, onLoadedMetadata, onResize, }: RoomPlatformVideoTileProps): JSX.Element;
651
+ export declare function RoomPlatformVideoTile({ kind, label, trackRef, className, media, mediaClassName, labelPosition, mirrored, onLoadedMetadata, onResize, }: RoomPlatformVideoTileProps): JSX.Element;
651
652
 
652
653
  export declare type RoomPlatformVideoTileKind = 'active-speaker' | 'overlay' | 'preview' | 'stage';
653
654
 
@@ -659,6 +660,7 @@ export declare type RoomPlatformVideoTileProps = {
659
660
  media?: ReactNode;
660
661
  mediaClassName?: string;
661
662
  labelPosition?: 'bottom-left' | 'top-left';
663
+ mirrored?: boolean;
662
664
  onLoadedMetadata?: ReactEventHandler<HTMLVideoElement>;
663
665
  onResize?: ReactEventHandler<HTMLVideoElement>;
664
666
  };
@@ -708,6 +710,8 @@ declare type RoomPrivateRoomStatus = 'ringing' | 'active';
708
710
  export declare function useRoomPlatform(): RoomPlatformContextValue;
709
711
 
710
712
  declare function useRoomPlatformCameraBackground({ localVideoTrack, onProcessorSettled, }: UseRoomPlatformCameraBackgroundInput): {
713
+ mirrorVideoPreview: boolean;
714
+ setMirrorVideoPreview: (enabled: boolean) => void;
711
715
  state: RoomPlatformCameraBackgroundState;
712
716
  uploadItems: RoomPlatformCameraBackgroundUploadPreview[];
713
717
  uploadPreviewUrl: string;