@whereby.com/browser-sdk 2.0.0-alpha16 → 2.0.0-alpha18

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/dist/types.d.ts CHANGED
@@ -35,10 +35,16 @@ declare global {
35
35
 
36
36
  interface VideoViewSelfProps {
37
37
  stream: MediaStream;
38
+ muted?: boolean;
38
39
  style?: React.CSSProperties;
40
+ onResize?: ({ width, height, stream }: {
41
+ width: number;
42
+ height: number;
43
+ stream: MediaStream;
44
+ }) => void;
39
45
  }
40
46
  type VideoViewProps = VideoViewSelfProps & React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
41
- declare const _default: ({ muted, stream, ...rest }: VideoViewProps) => JSX.Element;
47
+ declare const _default: ({ muted, stream, onResize, ...rest }: VideoViewProps) => JSX.Element;
42
48
 
43
49
  type CameraEnabledEvent = {
44
50
  enabled: boolean;
@@ -311,6 +317,11 @@ declare class RoomConnection extends TypedEventTarget {
311
317
  setDisplayName(displayName: string): void;
312
318
  acceptWaitingParticipant(participantId: string): void;
313
319
  rejectWaitingParticipant(participantId: string): void;
320
+ updateStreamResolution({ streamId, width, height }: {
321
+ streamId?: string;
322
+ width: number;
323
+ height: number;
324
+ }): void;
314
325
  }
315
326
 
316
327
  type RemoteParticipantState = Omit<RemoteParticipant, "updateStreamState">;
@@ -339,8 +350,9 @@ interface RoomConnectionActions {
339
350
  acceptWaitingParticipant(participantId: string): void;
340
351
  rejectWaitingParticipant(participantId: string): void;
341
352
  }
353
+ type VideoViewComponentProps = Omit<React.ComponentProps<typeof _default>, "onResize">;
342
354
  interface RoomConnectionComponents {
343
- VideoView: typeof _default;
355
+ VideoView: (props: VideoViewComponentProps) => ReturnType<typeof _default>;
344
356
  }
345
357
  type RoomConnectionRef = {
346
358
  state: RoomConnectionState;
@@ -350,6 +362,6 @@ type RoomConnectionRef = {
350
362
  };
351
363
  declare function useRoomConnection(roomUrl: string, roomConnectionOptions: UseRoomConnectionOptions): RoomConnectionRef;
352
364
 
353
- declare const sdkVersion = "2.0.0-alpha16";
365
+ declare const sdkVersion = "2.0.0-alpha18";
354
366
 
355
367
  export { _default as VideoView, sdkVersion, useLocalMedia, useRoomConnection };