muted in Firefox

150 views
Skip to first unread message

Scott Haynes

unread,
Jul 23, 2013, 5:02:36 PM7/23/13
to discuss...@googlegroups.com
I'm creating my video elements dynamically in javascript, and I'm having an issue with Firefox not muting the video element property.  When I inspect the element, muted='true' is listed in the element.  When I right click on the video element, and select 'Mute' that fixes the issue.  What is the right click menu doing, and/or how can I set that local video elements mute property?

Scott

Silvia Pfeiffer

unread,
Jul 23, 2013, 7:59:22 PM7/23/13
to discuss...@googlegroups.com
Set videoelement.muted=true should do it. Is that what you're doing?
S.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "discuss-webrtc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to discuss-webrt...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Scott Haynes

unread,
Jul 23, 2013, 8:11:02 PM7/23/13
to discuss...@googlegroups.com
I'm creating the element below and then I call attachMediaStream which is defined in adapter.js

Scott

                $container.append(
                    "<div id='"+ divId + "'>" +
                        "<video class='vwf-webrtc-video' id='" + videoId +
                            "' width='320' height='240' " +
                            "loop='loop' autoplay = true muted='true' " +
                            "style='position: absolute; left: 0; top: 0; z-index: 40;'>" +
                        "</video>" +
                    "</div>"
                );

bryand...@gmail.com

unread,
Jul 23, 2013, 8:27:28 PM7/23/13
to discuss...@googlegroups.com

'true' !== true

Could that be the problem?

Silvia Pfeiffer

unread,
Jul 23, 2013, 8:44:12 PM7/23/13
to discuss...@googlegroups.com
If you're doing it via HTML, it's best to not give the boolean
attributes any value - just having them there will set them to true:

So, this should suffice:

<video class='vwf-webrtc-video' id='" + videoId +
"' width='320' height='240' " +
"loop autoplay muted " +
"style='position: absolute; left: 0; top: 0;
z-index: 40;'>

HTH,
Silvia.

Scott Haynes

unread,
Jul 23, 2013, 8:52:45 PM7/23/13
to discuss...@googlegroups.com
I've tried muted=true and muted, neither worked in firefox

Silvia Pfeiffer

unread,
Jul 23, 2013, 9:13:00 PM7/23/13
to discuss...@googlegroups.com
Try muted="muted" . Also, maybe it's a bug, see:
http://stackoverflow.com/questions/14111917/html5-video-muted-but-stilly-playing

Seems like it should work since Firefox 11:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video

Silvia.

Scott Haynes

unread,
Jul 23, 2013, 10:37:32 PM7/23/13
to discuss...@googlegroups.com
Thanks, I've got everything working by just setting muted after the html element is created and that seems to be working well.  html can drive me a little crazy at times, especially getting things to work in multiple browsers.

Scott
Reply all
Reply to author
Forward
0 new messages