@whereby.com/browser-sdk 2.7.0-beta.0 → 2.8.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/dist/cdn/v2-embed.js +18 -0
- package/dist/cdn/v2-react.js +3 -0
- package/dist/embed/index.esm.js +1 -1
- package/dist/react/index.d.ts +14 -30
- package/dist/react/index.esm.js +17 -717
- package/package.json +94 -101
- package/dist/cdn/v2-embed-beta.js +0 -16
- package/dist/cdn/v2-react-beta.js +0 -3
package/dist/embed/index.esm.js
CHANGED
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Store, LocalMediaOptions, RemoteParticipant, LocalParticipant, Screenshare, ConnectionStatus, ChatMessage as ChatMessage$1 } from '@whereby.com/core';
|
|
3
|
+
import { RoleName } from '@whereby.com/media';
|
|
3
4
|
|
|
4
5
|
interface VideoViewSelfProps {
|
|
5
6
|
stream: MediaStream;
|
|
@@ -46,7 +47,11 @@ type UseLocalMediaResult = {
|
|
|
46
47
|
type UseLocalMediaOptions = LocalMediaOptions;
|
|
47
48
|
|
|
48
49
|
type RemoteParticipantState = Omit<RemoteParticipant, "newJoiner" | "streams">;
|
|
49
|
-
|
|
50
|
+
interface LocalParticipantState extends LocalParticipant {
|
|
51
|
+
isScreenSharing: boolean;
|
|
52
|
+
roleName: RoleName;
|
|
53
|
+
clientClaim?: string;
|
|
54
|
+
}
|
|
50
55
|
interface WaitingParticipantState {
|
|
51
56
|
id: string;
|
|
52
57
|
displayName: string | null;
|
|
@@ -90,17 +95,19 @@ interface UseRoomConnectionOptions extends Omit<RoomConnectionOptions, "localMed
|
|
|
90
95
|
localMedia?: UseLocalMediaResult;
|
|
91
96
|
}
|
|
92
97
|
interface RoomConnectionActions {
|
|
93
|
-
sendChatMessage(text: string): void;
|
|
94
|
-
knock(): void;
|
|
95
|
-
setDisplayName(displayName: string): void;
|
|
96
|
-
toggleCamera(enabled?: boolean): void;
|
|
97
|
-
toggleMicrophone(enabled?: boolean): void;
|
|
98
98
|
acceptWaitingParticipant(participantId: string): void;
|
|
99
|
+
knock(): void;
|
|
100
|
+
lockRoom(locked: boolean): void;
|
|
101
|
+
muteParticipants(clientIds: string[]): void;
|
|
99
102
|
rejectWaitingParticipant(participantId: string): void;
|
|
103
|
+
sendChatMessage(text: string): void;
|
|
104
|
+
setDisplayName(displayName: string): void;
|
|
100
105
|
startCloudRecording(): void;
|
|
101
106
|
startScreenshare(): void;
|
|
102
107
|
stopCloudRecording(): void;
|
|
103
108
|
stopScreenshare(): void;
|
|
109
|
+
toggleCamera(enabled?: boolean): void;
|
|
110
|
+
toggleMicrophone(enabled?: boolean): void;
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
type VideoViewComponentProps = Omit<React.ComponentProps<typeof _default>, "onResize">;
|
|
@@ -117,27 +124,4 @@ declare function useRoomConnection(roomUrl: string, roomConnectionOptions?: UseR
|
|
|
117
124
|
|
|
118
125
|
declare function useLocalMedia(optionsOrStream?: UseLocalMediaOptions | MediaStream): UseLocalMediaResult;
|
|
119
126
|
|
|
120
|
-
type
|
|
121
|
-
top: number;
|
|
122
|
-
left: number;
|
|
123
|
-
};
|
|
124
|
-
type Bounds = {
|
|
125
|
-
width: number;
|
|
126
|
-
height: number;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
interface GridProps {
|
|
130
|
-
roomConnection: RoomConnectionRef;
|
|
131
|
-
renderParticipant?: ({ cell, participant, }: {
|
|
132
|
-
cell: {
|
|
133
|
-
clientId: string;
|
|
134
|
-
bounds: Bounds;
|
|
135
|
-
origin: Origin;
|
|
136
|
-
};
|
|
137
|
-
participant: RemoteParticipantState | LocalParticipantState;
|
|
138
|
-
}) => React.ReactNode;
|
|
139
|
-
videoGridGap?: number;
|
|
140
|
-
}
|
|
141
|
-
declare function Grid({ roomConnection, renderParticipant, videoGridGap }: GridProps): React.JSX.Element;
|
|
142
|
-
|
|
143
|
-
export { type ChatMessageState as ChatMessage, type LocalParticipantState as LocalParticipant, type RemoteParticipantState as RemoteParticipant, type RoomConnectionState as RoomConnection, type ScreenshareState as Screenshare, type UseLocalMediaResult, Grid as VideoGrid, _default as VideoView, type WaitingParticipantState as WaitingParticipant, useLocalMedia, useRoomConnection };
|
|
127
|
+
export { type ChatMessageState as ChatMessage, type LocalParticipantState as LocalParticipant, type RemoteParticipantState as RemoteParticipant, type RoomConnectionState as RoomConnection, type ScreenshareState as Screenshare, type UseLocalMediaResult, _default as VideoView, type WaitingParticipantState as WaitingParticipant, useLocalMedia, useRoomConnection };
|