feat: Implement an Electron-based broadcasting client with screen/window and audio source selection, including Pipewire integration, and add auto-unmute to the viewer.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
<span class="dot pulse"></span>
|
||||
<span>Connecting to Broadcaster</span>
|
||||
</div>
|
||||
<p style="margin-top:20px; font-size: 0.9rem; color: var(--text-secondary);">Click anywhere to enable audio once connected</p>
|
||||
</div>
|
||||
<video id="remoteVideo" autoplay playsinline controls></video>
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,13 @@ socket.on('offer', (id, description) => {
|
||||
overlay.classList.add('hidden');
|
||||
};
|
||||
|
||||
// Auto-unmute when the user interacts with the document to bypass browser// Auto-unmute when the user interacts with the document to bypass browser
|
||||
document.addEventListener('click', () => {
|
||||
remoteVideo.muted = false;
|
||||
// Set sink to max possible volume explicitly avoiding browser gain staging
|
||||
remoteVideo.volume = 1.0;
|
||||
}, {once: true});
|
||||
|
||||
peerConnection.onicecandidate = event => {
|
||||
if (event.candidate) {
|
||||
socket.emit('candidate', id, event.candidate);
|
||||
|
||||
Reference in New Issue
Block a user