@snapcall/stream-ui 1.0.0 → 1.3.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/README.md +36 -8
- package/dist/stream-ui.esm.js +3032 -1142
- package/dist/stream-ui.js +3028 -1138
- package/dist/stream-ui.umd.js +744 -361
- package/dist/types.d.ts +192 -30
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -52,6 +52,10 @@ Terminates the room, all participants will be disconnected and the room won't be
|
|
|
52
52
|
|
|
53
53
|
Generate a room token with a SnapCall button ID.
|
|
54
54
|
|
|
55
|
+
### `sendNotification(message: string, options: NotificationOptions): void`
|
|
56
|
+
|
|
57
|
+
Send a notification (tooltip), see [NotificationOptions](#notificationoptions) for the options.
|
|
58
|
+
|
|
55
59
|
## API
|
|
56
60
|
|
|
57
61
|
### `InitOptions`
|
|
@@ -71,32 +75,32 @@ Generate a room token with a SnapCall button ID.
|
|
|
71
75
|
}
|
|
72
76
|
```
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
#### `element`
|
|
75
79
|
|
|
76
80
|
##### **Required**
|
|
77
81
|
|
|
78
82
|
The HTML element where the UI will be rendered.
|
|
79
83
|
|
|
80
|
-
|
|
84
|
+
#### `sharedURL`
|
|
81
85
|
|
|
82
86
|
##### Default value: `window.location.href`
|
|
83
87
|
|
|
84
|
-
The URL used for features such as "Open new tab" or "
|
|
88
|
+
The URL used for features such as "Open new tab" or "Quick Connect".
|
|
85
89
|
|
|
86
|
-
|
|
90
|
+
#### `audioTiles`
|
|
87
91
|
|
|
88
92
|
##### Default value: `false`
|
|
89
93
|
|
|
90
94
|
Enable audio-only tiles.
|
|
91
95
|
|
|
92
|
-
|
|
96
|
+
#### `settingsShortcuts`
|
|
93
97
|
|
|
94
98
|
##### Default value: `[]`
|
|
95
99
|
|
|
96
100
|
Specified options are added as a small shortcut next to the menu button.
|
|
97
|
-
Possible values are: `openNewTab`, `copyLink`, `
|
|
101
|
+
Possible values are: `openNewTab`, `copyLink`, `quickConnect`, `settings` and `pip`.
|
|
98
102
|
|
|
99
|
-
|
|
103
|
+
#### `controls`
|
|
100
104
|
|
|
101
105
|
Allows to manage the available and enabled devices
|
|
102
106
|
|
|
@@ -125,8 +129,32 @@ type Device = 'microphone' | 'camera' | 'screenshare';
|
|
|
125
129
|
|
|
126
130
|
##### Default value: `{ available: true, enabled: false }`
|
|
127
131
|
|
|
128
|
-
|
|
132
|
+
#### `showMenuButton`
|
|
129
133
|
|
|
130
134
|
##### Default value: `true`
|
|
131
135
|
|
|
132
136
|
Display or hide the top-right menu button
|
|
137
|
+
|
|
138
|
+
### `NotificationOptions`
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
interface NotificationOptions {
|
|
142
|
+
icon?: JSX.Element | string;
|
|
143
|
+
subText?: string;
|
|
144
|
+
button?: {
|
|
145
|
+
icon?: JSX.Element | string;
|
|
146
|
+
text: string;
|
|
147
|
+
action: ({ close }: { close: () => void }) => void;
|
|
148
|
+
};
|
|
149
|
+
status?: {
|
|
150
|
+
icon?: JSX.Element | string;
|
|
151
|
+
text?: string;
|
|
152
|
+
boldText?: string;
|
|
153
|
+
};
|
|
154
|
+
width?: string;
|
|
155
|
+
backgroundColor?: string;
|
|
156
|
+
messageStyle?: React.CSSProperties;
|
|
157
|
+
ellipsis?: boolean;
|
|
158
|
+
duration?: number;
|
|
159
|
+
}
|
|
160
|
+
```
|