@whereby.com/browser-sdk 2.0.0-alpha11 → 2.0.0-alpha13
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 +2 -3
- package/dist/lib.cjs +3154 -90
- package/dist/lib.esm.js +3113 -56
- package/dist/types.d.ts +3 -3
- package/dist/{v2-alpha11.js → v2-alpha13.js} +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,14 +28,13 @@ The `useLocalMedia` hook enables preview and selection of local devices (camera
|
|
|
28
28
|
experiences, allowing end users to confirm their device selection up-front. This hook works seamlessly with the `useRoomConnection` hook described below.
|
|
29
29
|
|
|
30
30
|
```js
|
|
31
|
-
import { useLocalMedia, VideoView } from
|
|
31
|
+
import { useLocalMedia, VideoView } from "@whereby.com/browser-sdk";
|
|
32
32
|
|
|
33
33
|
function MyPreCallUX() {
|
|
34
34
|
const localMedia = useLocalMedia({ audio: false, video: true });
|
|
35
35
|
|
|
36
36
|
const { currentCameraDeviceId, cameraDevices, localStream } = localMedia.state;
|
|
37
37
|
const { setCameraDevice, toggleCameraEnabled } = localMedia.actions;
|
|
38
|
-
const { VideoView } = components;
|
|
39
38
|
|
|
40
39
|
return <div className="preCallView">
|
|
41
40
|
{ /* Render any UI, making use of state */ }
|
|
@@ -62,7 +61,7 @@ function MyPreCallUX() {
|
|
|
62
61
|
The `useRoomConnection` hook provides a way to connect participants in a given room, subscribe to state updates, and perform actions on the connection, like toggling camera or microphone.
|
|
63
62
|
|
|
64
63
|
```js
|
|
65
|
-
import { useRoomConnection } from
|
|
64
|
+
import { useRoomConnection } from "@whereby.com/browser-sdk";
|
|
66
65
|
|
|
67
66
|
function MyCallUX( { roomUrl, localStream }) {
|
|
68
67
|
const { state, actions, components } = useRoomConnection(
|