-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
muted
option makes no difference
#529
Comments
@AlexxIT if I change the following lines: WebRTC/custom_components/webrtc/www/video-rtc.js Lines 161 to 165 in 359e3ec
To: if (!this.video.muted) {
- this.video.muted = true;
+ this.video.muted = false;
this.video.play().catch(er => {
console.warn(er);
}); Then the audio starts unmuted, but it also starts paused by default. |
Ok, I think I understood what that piece of code is doing. It's actually falling back to muted audio if Chrome's autoplay block is detected. I just don't understand why it works in go2rtc's stream page normally, and also why it works with Frigate Card. |
One workaround is to use the WebRTC card within the Frigate Card, with the Frigate Card configured to auto unmute. |
This is a very complex and confusing issue. Different browsers allow audio+autoplay for completely different reasons. |
I'm seeing it in chrome and android webview. It works ok with version 3.1.1, the issue started with 3.2.1. I downgraded to 3.1.1 and it's working as expected again |
Same here, had to downgrade to 3.1.1 |
@Mr-HaleYa where you get this screenshot? |
At the bottom of this page |
I have 4 webrtc cards with:
On every browser refresh mute icon is muted or unmuted (seams random) - independently from other cards uuuu unmuted cards do not play any sound, and pressing mute button do not change anything (even icon do not change to muted state) |
Hi all! I'm casting a webrtc_camera card on a dashboard in panel mode, to my Nest Hub, as a baby-cam stream. Suspect this is related to this bug, however downgrading to other versions (3.2.1/3.2.0/3.1.1) does not resolve the issue, I'm casting the dashboard via DashCast (HA Continuesly Casting Dashboard) integration. |
Workaround is to use the Frigate card with the webrtc-card provider. The mute settings work properly with that setup |
Do you have a template configuration for that setup? |
This is the one I use: The dashboard: views:
- title: Home
type: panel
badges: []
cards:
- type: custom:frigate-card
cameras:
- live_provider: webrtc-card
webrtc_card:
url: camera_03
style: |
video {aspect-ratio: 16/9; object-fit: fill;}
.mode {display: none}
camera_entity: camera.video_porteiro
view:
default: live
live:
auto_play: all
auto_unmute: all
controls:
builtin: false
title:
mode: none
zoomable: true
layout:
fit: cover
position:
x: 0
'y': 0
lazy_unload: all
menu:
buttons:
cameras:
enabled: false
frigate:
enabled: false
fullscreen:
enabled: false
media_player:
enabled: false
play:
enabled: true
microphone:
enabled: false
live:
enabled: false
mute:
enabled: true
style: overlay
position: top
alignment: right
button_size: 80
dimensions:
aspect_ratio_mode: static
aspect_ratio: '16:9'
elements:
- type: custom:frigate-card-menu-state-icon
entity: cover.porta
tap_action:
action: toggle
priority: 51
performance:
profile: low How I call the service: service: cast.show_lovelace_view
data:
entity_id: media_player.sala_home
view_path: "0"
dashboard_path: video-porteiro The result: 1_5116194257362748298.mp4 |
|
I'm using Fully Kiosk browser and having this issue when I enable autoplay video and audio. It worked on version 3.1.1 and I have not updated the browser. |
I was able to fix my issue by commenting out this section at line 158 in video-rtc.js. I then added a console.warn to the first catch to see what was happening.
The error was:
This code is trying to catch an error caused by autoplay being blocked. In my case the error is caused by something else, but it still proceeds to mute the video even though I have muted: false in my config. This code block should be more specific about the error we are trying to catch on that first call to this.video.play(), and also should check that it is obeying the configuration for the muted attribute. |
same thing here and now o cant downgrade to 3.1.1 from HA menu |
@nortuzar I am also using fully kiosk. The solution for now is to comment out the section below in the
You will have to go back and do this every time the integration is upgraded. |
This isn't working for me. The video still autoplays muted. What browser is this working in for you please? EDIT: It turns out my changes aren't being reflected. I've edit video-rtc.js in my EDIT 2: My browser was loading the compressed version of the library, |
@codemunkie15 thanks for the fix. I was using the frigate card to fix the issue, but on mi fire HD 7 i take several seconds to start showing the stream, with this card with mode: mse work great. Hope this can be fixed in the next release , thanks for the awesome card |
I'm using the latest (3.2.1), and the
muted
option simply makes no difference: the audio is always muted no matter what:chrome_K7XW0OTLgv.mp4
The text was updated successfully, but these errors were encountered: