mediasfu-vue 1.1.1 → 1.1.2

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
@@ -156,6 +156,68 @@ Use `customComponent` for a completely different visible workspace while the
156
156
  room component keeps lifecycle ownership. Use the composable below when you
157
157
  want explicit state and action groups as well.
158
158
 
159
+ ## Reuse SDK panels in your own layout
160
+
161
+ Headless mode can combine your application layout with exported SDK controls.
162
+ Keep the room engine mounted with `:return-ui="false"`, receive its parameter
163
+ publications, and pass the latest room parameters to the panel you import.
164
+
165
+ Keep modal visibility connected to the room:
166
+
167
+ 1. Open the panel through the room's matching updater, such as
168
+ `updateIsRecordingModalVisible(true)`.
169
+ 2. Bind the component's `isRecordingModalVisible` prop (template: `:is-recording-modal-visible`) to the current room
170
+ value, and make its `onClose` callback call
171
+ `updateIsRecordingModalVisible(false)`.
172
+ 3. Pass the current room parameters and the component's required callbacks,
173
+ including recording confirmation and start actions.
174
+ 4. Customize supported styles, wrappers, or overrides without replacing the
175
+ underlying room callbacks.
176
+
177
+ Visibility props differ between components; use the exported component's
178
+ contract, not a generic `isVisible` prop for every panel. Do not maintain a
179
+ second independent visibility flag. With headless mode, built-in sidebar
180
+ navigation is not your application's navigation.
181
+
182
+ Opening a panel does not start recording or grant media permission. Keep
183
+ confirmation, permission checks, and teardown under the room engine's control.
184
+
185
+ ### Render the complete standard UI from the headless engine
186
+
187
+ Use `ModernMediasfuGenericHead` when your page needs the complete MediaSFU room
188
+ UI at a different point in its layout without mounting a second room engine.
189
+ The head target must appear before the engine in the template so Vue can move
190
+ the engine's exact compiled UI tree into it on the first render.
191
+
192
+ ```vue
193
+ <script setup lang="ts">
194
+ import {
195
+ ModernMediasfuGeneric,
196
+ ModernMediasfuGenericHead,
197
+ useMediasfuHeadless,
198
+ } from 'mediasfu-vue';
199
+
200
+ const room = useMediasfuHeadless();
201
+ </script>
202
+
203
+ <template>
204
+ <ModernMediasfuGenericHead :parameters="room.parameters.value" />
205
+
206
+ <ModernMediasfuGeneric
207
+ :return-u-i="false"
208
+ render-u-i-externally
209
+ :source-parameters="room.sourceParameters"
210
+ :update-source-parameters="room.updateSourceParameters"
211
+ @media-changed="room.onMediaChanged"
212
+ />
213
+ </template>
214
+ ```
215
+
216
+ The room engine still owns sockets, tracks, modal visibility, and sidebar
217
+ navigation. For more than one room on a page, give each engine a unique
218
+ `external-ui-target` such as `#support-room`, and pass the matching `target-id`
219
+ (`support-room`) to its head.
220
+
159
221
  ## Feature-rich headless quick start
160
222
 
161
223
  This example selects the best incoming stream, renders it, keeps all prepared
@@ -277,6 +339,19 @@ computed getter, watcher, or timer because it republishes. Pure reads use
277
339
 
278
340
  ## Working examples
279
341
 
342
+ ## Virtual backgrounds and breakout rooms in a custom Vue UI
343
+
344
+ Keep `ModernBackgroundModal` wired to the newest room publication and use the
345
+ room's visibility flag and updater rather than a second Vue ref. Render local
346
+ camera media from `useMediasfuHeadless().localVideo`; it resolves the active
347
+ processed/virtual stream before the raw camera, so self-view matches the stream
348
+ published to everyone else.
349
+
350
+ Reuse `ModernBreakoutRoomsModal` with the same live room bag when you want the
351
+ built-in planner. Save assignments before Start and show action errors in your
352
+ page. Filtering tiles is not a breakout transition: the SDK must update room
353
+ membership and pause/resume consumers for the participant's active room.
354
+
280
355
  - [MediaSFU QuickStart Apps](https://github.com/MediaSFU/MediaSFU-QuickStart-Apps) — runnable Cloud, MediaSFU Open, custom-prejoin, backend-proxy, and custom-UI examples across SDKs.
281
356
  - [SpacesTek Initial](https://github.com/MediaSFU/SpacesTekInitial) → [Final](https://github.com/MediaSFU/SpacesTekFinal) → [Advanced](https://github.com/MediaSFU/SpacesTekAdvanced) — a staged path from a starter room to a product-owned Spaces-style experience.
282
357
  - [MediaSFU Agents](https://github.com/MediaSFU/Agents) — multimodal voice/vision agent starters across supported frameworks.