-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Title: [Feature Request] Allow self-enabling audio in &framegrab mode
Summary
When using VDO.Ninja in &framegrab mode to push a canvas stream, there is currently no apparent way for the publisher to enable their own microphone. The iframe UI does not display a microphone toggle, and URL parameters like &audio or &audiodevice do not seem to initialize an audio track.
However, the core capability to capture audio in this mode clearly exists, as a Director in a room can send a request to the &framegrab user, which successfully prompts them to enable their microphone.
This request is to expose that audio-enabling functionality directly to the publisher, either via a URL parameter or a UI toggle, without requiring a Director's intervention.
Current Behavior
- A user navigates to a URL with
&push=STREAMID&framegrab. - The VDO.Ninja iframe loads, ready to receive video frames via
postMessage(). This works perfectly for video. - The UI presented to this publisher has no microphone icon or audio controls.
- Adding parameters like
&audio=trueor&audiodevice=DEVICEIDto the URL does not result in audio being captured or in any audio controls appearing in the UI. The resulting stream is video-only.
The Workaround (Demonstrating Capability)
We've observed that audio capture is possible if a Director is involved:
- The publisher joins a room:
&push=STREAMID&framegrab&room=ROOMID. - A Director joins the same room.
- In the Director's UI, they can navigate to the streamer's "Additional Controls" -> "Audio Settings".
- The Director sends a "request" to the streamer to enable their microphone.
- This action successfully triggers a microphone permission prompt on the publisher's side, and if accepted, audio is added to the
&framegrabstream.
This proves that the &framegrab client is fully capable of handling audio; it just lacks a self-initiation mechanism.
Expected Behavior
A publisher using &framegrab mode should be able to enable their own audio without needing a remote request from a Director.
Ideally, one of the following solutions would be implemented:
- Solution A (URL Parameter): The
&framegrabscene should fully respect the&audioand&audiodeviceparameters. When the URL includes&audio, it should automatically prompt for microphone access and begin streaming audio alongside the canvas video. - Solution B (UI Element): A microphone toggle button should be present in the
&framegrabiframe UI, allowing the publisher to manually enable, mute, and select their audio device at any time, similar to a standard video scene.
Use Case
Our application is a virtual whiteboard/drawing tool where a presenter draws on an HTML canvas and provides simultaneous audio commentary. The &framegrab feature is perfect for the video component. The presenter, however, is often operating alone and needs a simple way to start streaming their voice along with their drawings, without the complexity of setting up a separate Director's room just to enable their microphone.
Thank you for developing such a powerful and flexible tool!