mediasfu-vue 1.2.2 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.0 — 2026-10-09
4
+
5
+ - **Screen-share audio.** Sharing a tab or screen in a Chromium desktop browser now offers **Screen + audio** or **Screen only**. The audio is published as its own track, pauses and stops with the share, and never marks the sharer as speaking. Listeners hear it with a "*name* · Screen audio" card they can mute for themselves. Configure with the `screenAudioMode` (`ask`, `always`, `never`), `screenAudioEnabled` and `screenAudioPrompt` props, or `updateScreenAudioMode` / `updateScreenAudioEnabled` on the room parameters; new exports include `ScreenAudioPrompt`, `promptScreenAudioChoice`, `ScreenAudioPlayer`, `connectSendTransportScreenAudio`, `toggleScreenAudio` and `setScreenAudioVolume`. Media servers without screen-audio support keep video-only sharing.
6
+ - **Consumer backup preference.** When a busy consuming node has a connected backup, new streams are taken from the backup when it announces them within 1.5 seconds; otherwise from the busy node as before.
7
+ - **Clear connection errors.** Join pages explain why a room could not be joined (credentials refused, no meeting minutes, offline, server unreachable) instead of a generic message. `connectSocket` rejects with `MediaSocketConnectError` (`phase`, `elapsedMs`, `online`, `reason`, `stage`, `retryable`), and `describeMediaSocketError` returns a user-facing sentence. A refused credential is not retried in a loop, and network failures no longer count toward the join attempt limit.
8
+ - Audio-only players are removed when their producer closes, so a rejoin never leaves a second player behind.
9
+ - Requires `mediasfu-shared` 1.3.0 or later.
10
+
3
11
  ## 1.2.2 — 2026-09-30
4
12
 
5
13
  - Disable camera simulcast automatically for chat and capacity-two rooms, with an explicit `simulcastOff` opt-out for larger rooms and an optional `roomCapacity` hint.
package/README.md CHANGED
@@ -345,6 +345,46 @@ built-in planner. Save assignments before Start and show action errors in your
345
345
  page. Filtering tiles is not a breakout transition: the SDK must update room
346
346
  membership and pause/resume consumers for the participant's active room.
347
347
 
348
+ ## Screen-share audio
349
+
350
+ When someone shares a tab or screen in a Chromium desktop browser (Chrome, Edge,
351
+ Opera, Brave), the room asks **Share audio too?** with **Screen + audio** and
352
+ **Screen only**. The audio is published as its own track: everyone hears it,
353
+ listeners see a "*name* · Screen audio" card they can mute for themselves, and
354
+ the sharer is never shown as speaking because of it. It pauses and stops with
355
+ the screen share, and recordings include it. Firefox, Safari and mobile browsers
356
+ share video only, and media servers without screen-audio support keep
357
+ video-only screen sharing.
358
+
359
+ No setup is needed. To change the behaviour:
360
+
361
+ ```vue
362
+ <MediasfuGeneric screen-audio-mode="always" /> <!-- 'ask' (default) | 'always' | 'never' -->
363
+ <MediasfuGeneric :screen-audio-enabled="false" /> <!-- never request screen audio -->
364
+ ```
365
+
366
+ ```ts
367
+ import { toggleScreenAudio, setScreenAudioVolume } from 'mediasfu-vue';
368
+
369
+ toggleScreenAudio({ parameters: latestRoomParameters }); // sharer: mute/unmute screen audio, keep sharing
370
+ setScreenAudioVolume(0.5); // listener: screen-audio volume, 0..1
371
+ ```
372
+
373
+ Replace the dialog with your own by passing `screenAudioPrompt`, a function that
374
+ resolves `'audio'`, `'video'` (screen only) or `null` (cancel the share).
375
+
376
+ ## Connection errors
377
+
378
+ `connectSocket` rejects with a `MediaSocketConnectError` that says where the
379
+ connection stopped (`phase`: `before-open`, `after-open`, `rejected` or
380
+ `timeout`), how long it took (`elapsedMs`), the browser's `online` state and,
381
+ when the media server refused it, the `reason` and `stage`. The prebuilt join
382
+ pages already show a clear message, such as "The room did not accept these
383
+ credentials…" or "You appear to be offline…". In your own UI use
384
+ `describeMediaSocketError(error)`, and don't retry when `error.retryable` is
385
+ `false`: a refused credential will be refused again, so join the room again
386
+ through your backend to get fresh credentials.
387
+
348
388
  ## Host leave and rejoin
349
389
 
350
390
  Hosts can choose **Leave room** or **End for everyone**. **Leave room** keeps the room running so the host can rejoin later; **End for everyone** closes it for all participants. Programmatic callers pass `endRoomOnHostExit: false` to leave without ending the room; the default is `true`.
@@ -363,6 +403,8 @@ Hosts can choose **Leave room** or **End for everyone**. **Leave room** keeps th
363
403
  | What you see | Likely cause | What to do |
364
404
  |---|---|---|
365
405
  | "Unable to connect. Check your credentials and try again." | The room service rejected the credentials, or your create/join backend returned an error. | Check the API username and key on your server, and make sure your create/join adapters pass the room service's response through. For MediaSFU Open, confirm that `local-link` points to a server the browser can reach. |
406
+ | "The room did not accept these credentials…" | The media server refused the room credentials, often because the same name joined twice and the first secret was replaced. | Join the room again through your backend so it issues fresh credentials. Retrying the old ones will not succeed. |
407
+ | "You appear to be offline…" or "Could not reach the media server…" | The device has no connection, or a network, firewall or proxy blocked the media server. | Check the connection and firewall, then retry. These failures do not count toward the join attempt limit. |
366
408
  | The camera or microphone never starts | The page is not a secure context, or the browser permission was denied. | Serve the app over HTTPS (or `localhost` during development) and allow camera and microphone access for the site. |
367
409
  | "You must turn on your video before you can start recording" | The recording is set to capture video while your camera is off. | Turn the camera on first, or switch the recording to audio only. The same applies to audio recordings and the microphone. |
368
410
  | "You can only re-configure recording after pausing it" | Recording settings are locked while a recording is running. | Pause the recording, change the settings, then resume. |