@whereby.com/core 1.1.7 → 1.1.8

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
@@ -1,21 +1,85 @@
1
1
  # `@whereby.com/core`
2
2
 
3
- `@whereby.com/core` is an internal package containing business logic (API calls and state management etc.) to power the browser SDK, React Native and other forms of Whereby meetings. It also contains utils which may be useful in custom experiences.
3
+ `@whereby.com/core` is the low-level foundation of the Whereby SDK. It exposes a set of containers, actions, and client classes for working with local media and room connections. It's used to power the [Whereby Browser SDK](https://github.com/whereby/sdk/tree/main/packages/browser-sdk), [Whereby Assistants](https://github.com/whereby/sdk/tree/main/packages/assistant-sdk) and [React Native SDK](https://github.com/whereby/sdk/tree/main/packages/react-native-sdk) and other forms of Whereby meetings. It also contains utils which may be useful in custom experiences.
4
+
5
+ Use Core if you need **fine-grained control** over media and connections, or if you are building a custom integration outside of React. For most web apps, the Browser or React SDKs will be easier starting points.
4
6
 
5
7
  ## Installation
6
8
 
7
9
  ```shell
8
- npm install @whereby.com/browser-core
10
+ npm install @whereby.com/core
9
11
  ```
10
12
 
11
13
  or
12
14
 
13
15
  ```shell
14
- yarn add @whereby.com/browser-core
16
+ yarn add @whereby.com/core
15
17
  ```
16
18
 
17
19
  or
18
20
 
19
21
  ```shell
20
- pnpm add @whereby.com/browser-core
22
+ pnpm add @whereby.com/core
21
23
  ```
24
+
25
+ ## Usage
26
+
27
+ > [!IMPORTANT]
28
+ > In order to use `@whereby.com/core`, you must have a Whereby account
29
+ > from which you can create room URLs, either [manually or through the Whereby
30
+ > API](https://docs.whereby.com/whereby-101/creating-and-deleting-rooms).
31
+
32
+ ### Getting Started
33
+
34
+ ```js
35
+ import { WherebyClient } from "@whereby.com/core";
36
+
37
+ const client = new WherebyClient();
38
+
39
+ // manage local devices
40
+ const localMedia = client.getLocalMedia();
41
+
42
+ // manage room connection
43
+ const roomConnection = client.getRoomConnection();
44
+ ```
45
+
46
+ ### Core Concepts
47
+
48
+ #### Local Media
49
+
50
+ The `LocalMediaClient` controls microphones, cameras and local media tracks. It provides methods to request permissions, start and stop tracks, and switch between devices. It also exposes state such as the list of available devices and the current active tracks.
51
+
52
+ Typical usage:
53
+
54
+ ```js
55
+ // you can pass options or a MediaStream
56
+ await localMedia.startMedia({ audio: true, video: true });
57
+
58
+ localMedia.toggleCamera(); // toggle camera on/off
59
+ ```
60
+
61
+ #### Room Connection
62
+
63
+ The `RoomConnectionClient` handles joining and leaving rooms, as well as observing connection and remote participant state.
64
+
65
+ Typical usage:
66
+
67
+ ```js
68
+ // initialize with your room URL
69
+ roomConnection.initialize({
70
+ roomUrl: "https://your-subdomain.whereby.com/your-room",
71
+ });
72
+
73
+ // join the room
74
+ roomConnection.joinRoom();
75
+
76
+ // listen for changes in connection state
77
+ roomConnection.subscribeToConnectionStatus((state) => {
78
+ console.log("Connection state changed:", state);
79
+ });
80
+ ```
81
+
82
+ ### Learn More
83
+
84
+ - Core SDK API Reference: [API Documentation](https://docs.whereby.com/reference/core-sdk-reference)
85
+ - Core SDK Quick Start Guide: [Quick Start Guide](https://docs.whereby.com/reference/core-sdk-reference/quick-start)
package/dist/index.cjs CHANGED
@@ -1147,7 +1147,7 @@ const createReactor = (selectors, callback) => {
1147
1147
  });
1148
1148
  };
1149
1149
 
1150
- const coreVersion = "1.1.7";
1150
+ const coreVersion = "1.1.8";
1151
1151
 
1152
1152
  const initialState = {
1153
1153
  isNodeSdk: false,
package/dist/index.mjs CHANGED
@@ -1145,7 +1145,7 @@ const createReactor = (selectors, callback) => {
1145
1145
  });
1146
1146
  };
1147
1147
 
1148
- const coreVersion = "1.1.7";
1148
+ const coreVersion = "1.1.8";
1149
1149
 
1150
1150
  const initialState = {
1151
1151
  isNodeSdk: false,
@@ -1145,7 +1145,7 @@ const createReactor = (selectors, callback) => {
1145
1145
  });
1146
1146
  };
1147
1147
 
1148
- const coreVersion = "1.1.7";
1148
+ const coreVersion = "1.1.8";
1149
1149
 
1150
1150
  const initialState = {
1151
1151
  isNodeSdk: false,
@@ -75,7 +75,7 @@ const createReactor = (selectors, callback) => {
75
75
  });
76
76
  };
77
77
 
78
- const coreVersion = "1.1.7";
78
+ const coreVersion = "1.1.8";
79
79
 
80
80
  const initialState = {
81
81
  isNodeSdk: false,
@@ -73,7 +73,7 @@ const createReactor = (selectors, callback) => {
73
73
  });
74
74
  };
75
75
 
76
- const coreVersion = "1.1.7";
76
+ const coreVersion = "1.1.8";
77
77
 
78
78
  const initialState = {
79
79
  isNodeSdk: false,
@@ -73,7 +73,7 @@ const createReactor = (selectors, callback) => {
73
73
  });
74
74
  };
75
75
 
76
- const coreVersion = "1.1.7";
76
+ const coreVersion = "1.1.8";
77
77
 
78
78
  const initialState = {
79
79
  isNodeSdk: false,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@whereby.com/core",
3
3
  "description": "Core library for whereby.com sdk",
4
4
  "author": "Whereby AS",
5
- "version": "1.1.7",
5
+ "version": "1.1.8",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -61,8 +61,8 @@
61
61
  "@whereby.com/eslint-config": "0.1.0",
62
62
  "@whereby.com/jest-config": "0.1.0",
63
63
  "@whereby.com/prettier-config": "0.1.0",
64
- "@whereby.com/tsconfig": "0.1.0",
65
- "@whereby.com/rollup-config": "0.1.0"
64
+ "@whereby.com/rollup-config": "0.1.0",
65
+ "@whereby.com/tsconfig": "0.1.0"
66
66
  },
67
67
  "dependencies": {
68
68
  "@reduxjs/toolkit": "^2.2.3",