mediasfu-vue 1.5.1 → 1.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.0 — 2026-12-04
4
+
5
+ - Requires `mediasfu-shared` 1.7.0.
6
+ - **Sign-language assistant on new rooms.** `createRoomOnMediaSFU` (and `noUIPreJoinOptions`) accept `signAssist`: `true` (read the host's signing) or `{ signers, avatar, voice, required }`. The create answer's `signAssist` says whether the assistant is joining, with its per-minute rate, or why it could not come. It runs on MediaSFU Cloud rooms created with the account's API key and is paid from the account's sign credit. New types: `SignAssistRequest`, `SignAssistOptions`, `SignAssistCreateResult`, `SignAssistStatus`, `SignAssistRefusalCode`.
7
+ - **Read or stop the assistant.** `getSignAssistOnMediaSFU({ roomName, apiUserName, apiKey })` returns its state, minutes and charge so far, and a caption stream (`{ url, token, expiresAt }`) for your own player. `stopSignAssistOnMediaSFU` stops it early, and billing stops with it.
8
+ - **Refused creates keep the server's reason.** A refused create returns the server's own message in `error` (`Unable to create room, <server message>`; before, only `HTTP error! Status: 402`) and now also the server's `code` (for example `SIGN_CREDITS_REQUIRED` or `region-unavailable`) and the HTTP `status`.
9
+ - **Send new server fields and read the whole reply.** Room create and join options take `extra`: fields sent as they are beside the typed ones, so a field MediaSFU adds later works without an SDK update. A typed field that is set wins, and `extra` can never set `action`, `userName`, `meetingID` or the credentials. Every create, join and sign assist result now also has `raw`, the server's whole JSON reply, on success and on refusal; `data` is unchanged. A refused join keeps the server's `code` and the HTTP `status`, as a refused create does.
10
+ - **A warning before an empty call ends.** When people are in a room but nobody has shared audio or video for 15 minutes, everyone now sees "This room ends in 5:00 unless someone shares audio or video." (chat rooms included) before the server ends it. Turning on a microphone, camera or screen share keeps the room open.
11
+ - **Calls on blocked networks now connect in Firefox too.** On a network that blocks the ports media normally uses, the TURN relay offered by the media server is now in place from the start on Firefox, which cannot add it to a connection that is already running. Before, the relay was never used in Firefox and the participant only saw the blocked-network message. Direct connections are still preferred, so the relay carries media only when they fail. Chrome, Edge and Safari are unchanged.
12
+
13
+ ## 1.6.0 — 2026-11-29
14
+
15
+ - Requires `mediasfu-shared` 1.6.0.
16
+ - **Breakout room timers.** Hosts can give breakout rooms a length when starting them (the classic and modern breakout modals: a timer choice before the start; while rooms run, the time left and **+5 min**). The server owns the deadline and ends the rooms itself. Participants see the time left next to their own room in the pagination, "Returning to the main room in 60 seconds" one minute before the end, and "Breakout rooms have ended: time is up" when the timer ends them. New exports: BreakoutTimerControls, BreakoutCountdown and useBreakoutCountdown.
17
+ - **Participants open their own breakout room.** When rooms start, or a participant is moved while they run, their view goes to their room's page instead of staying on the main room. When rooms end, it returns to the first page. A reconnecting host gets their current room back.
18
+ - **The display type survives breakouts.** It is kept when the host starts rooms and restored when they end.
19
+ - **Room plans are checked with the server's reasons**, for example "ann is in both Room 1 and Room 2" or "Room 1 has more than 2 participants". An edit of running rooms may leave a room empty.
20
+ - Video quality tiers are matched in any case, so a "qnhd" room gets the QnHD frame rate, capture size and bitrate.
21
+
3
22
  ## 1.5.0 — 2026-11-12
4
23
 
5
24
  - Requires `mediasfu-shared` 1.5.0 or later.
package/README.md CHANGED
@@ -218,6 +218,91 @@ navigation. For more than one room on a page, give each engine a unique
218
218
  `external-ui-target` such as `#support-room`, and pass the matching `target-id`
219
219
  (`support-room`) to its head.
220
220
 
221
+ ## Sign-language assistant (MediaSFU Cloud)
222
+
223
+ Ask for MediaSFU's sign-language assistant when you create a room. It turns the listed signers' signing into captions
224
+ (and into speech with `voice: true`), and its avatar can sign what is spoken. It is paid per started minute from the
225
+ account's sign credit, so create these rooms from your server with the account API key.
226
+
227
+ ```ts
228
+ import {
229
+ createRoomOnMediaSFU,
230
+ getSignAssistOnMediaSFU,
231
+ stopSignAssistOnMediaSFU,
232
+ } from 'mediasfu-vue';
233
+
234
+ const created = await createRoomOnMediaSFU({
235
+ payload: {
236
+ action: 'create',
237
+ userName: 'host01',
238
+ duration: 60,
239
+ capacity: 10,
240
+ signAssist: { signers: ['host01'], avatar: true, required: false }, // or simply: signAssist: true
241
+ },
242
+ apiUserName,
243
+ apiKey,
244
+ });
245
+
246
+ const data = created.data;
247
+ if (data && 'error' in data) {
248
+ console.error(data.code, data.error); // for example 'SIGN_CREDITS_REQUIRED' (HTTP 402)
249
+ } else if (data) {
250
+ console.log(data.signAssist?.state); // 'joining' or 'joined'; 'refused' with a reason when required is false
251
+ }
252
+
253
+ // Later: state, minutes and charge so far, and a caption stream for your own player; or stop it early.
254
+ const status = await getSignAssistOnMediaSFU({ roomName: 'your-room-name', apiUserName, apiKey });
255
+ await stopSignAssistOnMediaSFU({ roomName: 'your-room-name', apiUserName, apiKey });
256
+ ```
257
+
258
+ - `signers`: up to 4 participant names (2-10 letters or digits) whose signing is read. Default: the creating `userName`.
259
+ An empty list with the avatar on is avatar-only.
260
+ - `required` (default `true`) refuses the whole create when the assistant cannot come (`SIGN_CREDITS_REQUIRED`,
261
+ `SIGN_ASSIST_NOT_ENABLED`, `SIGN_ASSIST_UNAVAILABLE`, ...). With `false` the room opens without it.
262
+ - A refused create keeps `error` as before and adds the server's `code` and the HTTP `status`.
263
+
264
+ ### Send fields this SDK does not type yet, and read the whole reply
265
+
266
+ When MediaSFU adds a room field, you can use it the day it ships, with no SDK update: put it in `extra`, and read new
267
+ reply fields from `raw`. The server still checks every field, so `extra` is no way around a rule.
268
+
269
+ ```ts
270
+ import { createRoomOnMediaSFU, joinRoomOnMediaSFU } from 'mediasfu-vue';
271
+
272
+ const created = await createRoomOnMediaSFU({
273
+ payload: {
274
+ action: 'create',
275
+ userName: 'host01',
276
+ duration: 60,
277
+ capacity: 10,
278
+ signAssist: { signers: ['host01'], avatar: true },
279
+ extra: { someNewField: true }, // sent as is beside the typed fields
280
+ },
281
+ apiUserName,
282
+ apiKey,
283
+ });
284
+
285
+ if (!created.success) {
286
+ const error = created.data as { error: string; code?: string; status?: number } | null;
287
+ console.error(error?.code, error?.status, created.raw); // the server's code, the HTTP status, its whole reply
288
+ } else {
289
+ console.log(created.raw?.someNewReplyField); // any reply field, typed or not
290
+ }
291
+
292
+ const joined = await joinRoomOnMediaSFU({
293
+ payload: { action: 'join', meetingID: 'your-room-name', userName: 'guest1', extra: { someNewField: 1 } },
294
+ apiUserName,
295
+ apiKey,
296
+ });
297
+ console.log(joined.raw); // also on a refusal, beside data.code and data.status
298
+ ```
299
+
300
+ - `extra` on create and join options (and the body of `stopSignAssistOnMediaSFU`): each field is sent unless a typed
301
+ field already sets it. `action`, `userName`, `meetingID` and the credentials can never be set from `extra`.
302
+ - `raw` on every create, join and sign assist result: the server's JSON reply as received, on success and on refusal.
303
+ `data` is unchanged. `raw` is absent when the request never reached MediaSFU or the reply was not JSON.
304
+ - Prices and quality are not SDK options, in `extra` or anywhere else: MediaSFU sets them on the server.
305
+
221
306
  ## Feature-rich headless quick start
222
307
 
223
308
  This example selects the best incoming stream, renders it, keeps all prepared