diff --git a/lib.js b/lib.js
index bcd797cd4..be74f2b6c 100644
--- a/lib.js
+++ b/lib.js
@@ -29193,6 +29193,9 @@ async function grabVideo(quality = 0, eleName = "previewWebcam", selector = "sel
}
session.videoElement.controls = session.showControls || false;
+ if (typeof session.volume == "number") {
+ session.videoElement.volume = session.volume;
+ }
log("selector: " + selector);
var videoSelect = document.querySelector(selector); // document.querySelector("videoSource3").value == "ZZZ"
@@ -31147,7 +31150,11 @@ async function press2talk(clean = false) {
}
// videosource
- session.videoElement.muted = true;
+ if (typeof session.volume == "number") {
+ session.videoElement.volume = session.volume;
+ }
+ session.videoElement.muted = !session.noMutePreview;
+
session.videoElement.autoplay = true;
session.videoElement.controls = session.showControls || false;
session.videoElement.setAttribute("playsinline", "");
@@ -31429,6 +31436,10 @@ session.publishStream = function (v) {
container.style.display = "none";
}
+ if (session.noMutePreview) {
+ v.muted = false;
+ }
+
if (((session.roomid === false || session.roomid === "") && session.quality === false) || session.forceMediaSettings) {
try {
if (session.quality_wb !== false && session.quality === false) {
diff --git a/main.js b/main.js
index fa0d46b1a..f8e8d75d9 100644
--- a/main.js
+++ b/main.js
@@ -3135,6 +3135,10 @@ async function main() {
}
}
+ if (urlParams.has("nomutepreview")) {
+ session.noMutePreview = true;
+ }
+
if (urlParams.has("obsfix")) {
session.obsfix = urlParams.get("obsfix");
if (session.obsfix) {
diff --git a/rawdoc.md b/rawdoc.md
index b6dd0ce52..543d6717f 100644
--- a/rawdoc.md
+++ b/rawdoc.md
@@ -631,6 +631,7 @@ Please report bugs. It's a first release, using the alpha version of VDO.Ninja,
* [\&outboundaudiobitrate](source-settings/and-outboundaudiobitrate.md)
* [\&inputchannels](advanced-settings/audio-parameters/and-inputchannels.md)
* [\&monomic](advanced-settings/audio-parameters/and-monomic.md)
+ * [\&nomutepreview](advanced-settings/audio-parameters/and-nomutepreview.md)
* [\&audiooutput](https://docs.vdo.ninja/advanced-settings/view-parameters/and-outputdevice)
* [\&sink](https://docs.vdo.ninja/advanced-settings/view-parameters/and-sink)
* [\&volume](advanced-settings/audio-parameters/and-volume.md)
@@ -1628,6 +1629,31 @@ There is [`&mono`](../view-parameters/mono.md) to set the audio output to mono o
[and-inputchannels.md](and-inputchannels.md)
[mono.md](../view-parameters/mono.md)
+
+---
+description: Unmutes the local self-preview by default
+---
+
+# &nomutepreview
+
+Sender-Side Option! ([`&push`](../source-settings/push.md))
+
+## Details
+
+If `&nomutepreview` is passed, the video preview will be unmuted when you press the start button, playing the microphone input back to you (audio monitoring).
+
+You can also activate this during a stream by [showing the control bar](../newly-added-parameters/and-videocontrols.md) and using the volume control there.
+
+This can also be passed in director mode and will affect the director's own stream.
+
+## Related
+
+[and-preview.md](../../source-settings/and-preview.md)
+
+[and-nopreview.md](../../source-settings/and-nopreview.md)
+
+[and-volume.md](../../source-settings/and-volume.md)
+
---
description: Disables all audio playback from room directors
---
@@ -1941,7 +1967,7 @@ You can add them to both, source ([`&push`](../../source-settings/push.md)) and
You have to add them to the source side ([`&push`](../../source-settings/push.md)).
-
| Parameter | Explanation |
|---|
&audiodevice | Pre-configures the selected audio device |
&echocancellation | Automatic echo-cancellation is ON or OFF |
&audiogain | Applies a gain multiplier (as a percentage) to the local microphone |
&autogain | Sets whether audio auto-normalization is ON or OFF |
&compressor | Applies a generic audio compressor to the local microphone |
&denoise | Turn audio noise reduction filter ON or OFF |
&distort | Will try to "distort" your microphone's output audio, making your voice a bit anonymous |
&equalizer | Provides access to a generic audio equalizer that can be applied to the local microphone |
&limiter | Applies a generic audio limiter to the local microphone |
&lowcut | Adds a low-cut filter |
&noisegate | Lowers your mic volume to 10% of its current value based on volume-level activity |
&noisegatesettings | Lets you tweak the &noisegate variables, making it more or less aggressive as needed |
&audiocontenthint | =music fixed bitrate; =speech bitrate is variable |
&audiolatency | Adds an audio-latency to the published audio stream |
&micdelay | Delays the microphone by specified time in ms |
&mute | Starts with the microphone muted by default |
&automute | Will mute the microphone of a guest when not loaded in an active OBS scene |
&outboundaudiobitrate | Target audio bitrate and max bitrate for outgoing audio streams |
&inputchannels | Audio capture device to select N-number of audio channels |
&monomic | Sets a guest's audio input to mono (1-channel) |
+| Parameter | Explanation |
|---|
&audiodevice | Pre-configures the selected audio device |
&echocancellation | Automatic echo-cancellation is ON or OFF |
&audiogain | Applies a gain multiplier (as a percentage) to the local microphone |
&autogain | Sets whether audio auto-normalization is ON or OFF |
&compressor | Applies a generic audio compressor to the local microphone |
&denoise | Turn audio noise reduction filter ON or OFF |
&distort | Will try to "distort" your microphone's output audio, making your voice a bit anonymous |
&equalizer | Provides access to a generic audio equalizer that can be applied to the local microphone |
&limiter | Applies a generic audio limiter to the local microphone |
&lowcut | Adds a low-cut filter |
&noisegate | Lowers your mic volume to 10% of its current value based on volume-level activity |
&noisegatesettings | Lets you tweak the &noisegate variables, making it more or less aggressive as needed |
&audiocontenthint | =music fixed bitrate; =speech bitrate is variable |
&audiolatency | Adds an audio-latency to the published audio stream |
&micdelay | Delays the microphone by specified time in ms |
&mute | Starts with the microphone muted by default |
&automute | Will mute the microphone of a guest when not loaded in an active OBS scene |
&outboundaudiobitrate | Target audio bitrate and max bitrate for outgoing audio streams |
&inputchannels | Audio capture device to select N-number of audio channels |
&monomic | Sets a guest's audio input to mono (1-channel) |
&nomutepreview | Unmutes the local self-preview by default |
## **Viewer side options**
@@ -7655,6 +7681,8 @@ If you want the VDO.Ninja self-preview to not be mini-sized in [broadcast](../vi
[and-nopreview.md](../../source-settings/and-nopreview.md)
[broadcast.md](../view-parameters/broadcast.md)
+
+[and-nomutepreview.md](../audio-parameters/and-nomutepreview.md)
---
description: Used to position where the mini preview is located by default on screen
---
@@ -19939,8 +19967,6 @@ Example: `&minipreview=0`
## Details
-## Details
-
Shows the mini self-preview at the top right corner. This is the default behavior when [`&broadcast`](../advanced-settings/view-parameters/broadcast.md) mode is on.
You can change the default position of the mini preview with [`&minipreviewoffset`](../advanced-settings/video-parameters/and-minipreview-1.md).
@@ -19956,6 +19982,8 @@ You can change the default position of the mini preview with [`&minipreviewoffse
[and-nopreview.md](and-nopreview.md)
[broadcast.md](../advanced-settings/view-parameters/broadcast.md)
+
+[and-nomutepreview.md](../advanced-settings/audio-parameters/and-nomutepreview.md)
---
description: Starts with the microphone muted by default
---
@@ -20180,6 +20208,8 @@ Forces the guest to have a self-preview.
[and-minipreview.md](and-minipreview.md)
[and-nopreview.md](and-nopreview.md)
+
+[and-nomutepreview.md](../audio-parameters/and-nomutepreview.md)
---
description: Auto mutes guest's video
---