Closed Bug 1190023 Opened 9 years ago Closed 9 years ago

Tab sound icon shows on pages with <video muted>

Categories

(Core :: Audio/Video: Playback, defect)

42 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla42
Tracking Status
firefox41 --- unaffected
firefox42 --- verified

People

(Reporter: reuben, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 1 obsolete file)

STR:

1) Open a tab with a <video muted>, like this one: http://i.imgur.com/96apNsd.gifv

Result: Sound icon shows up.

Expected results: No sound icon.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
While this is fixed by bug 1190040, I would like to have a separate test for it.
Status: RESOLVED → REOPENED
Depends on: 1190040
Resolution: DUPLICATE → ---
Component: Tabbed Browser → Audio/Video: Playback
Product: Firefox → Core
Does your patch also fix the problem for media muted using the context menu?
Attachment #8642040 - Flags: review?(amarchesini) → review?(bugs)
Attachment #8642040 - Flags: review?(bugs) → review?(cpearce)
(In reply to Jesse Ruderman from comment #4)
> Does your patch also fix the problem for media muted using the context menu?

No, I filed that as bug 1190924.
Comment on attachment 8642040 [details] [diff] [review]
Add a test to ensure that muted media elements do not dispatch media-playback

This test is buggy since it doesn't wait for the loadedmetadata event, and therefore we have no audio track, and it passes because of the HasAudio() check...
Attachment #8642040 - Attachment is obsolete: true
Attachment #8642040 - Flags: review?(cpearce)
Comment on attachment 8643289 [details] [diff] [review]
Ensure that muting a media element dispatches the media-playback event, and also include the muted state in computing whether a media element is actively playing audio

Review of attachment 8643289 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/html/HTMLMediaElement.cpp
@@ +4467,5 @@
>      return;
>    }
>  
>    bool playingThroughTheAudioChannel =
> +     (!mPaused && !Muted() &&

What about if something sets the volume to 0? Do you want to not display the "playing audio" indicator then? If so you could check Volume() != 0 (possibly fuzzily; it's a float), and call UpdateAudioChannelPlayingState() in SetVolumeInternal().
Attachment #8643289 - Flags: review?(cpearce) → review+
That is a good idea, I'll do that.
https://hg.mozilla.org/mozilla-central/rev/a0e2077727c9
Status: ASSIGNED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Verified fixed on Windows 7 64bit, Ubuntu 13.10 32bit and Mac OSX 10.9.5 using Aurora 42.0a2 (buildID: 20150813124640).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: