Open Bug 1610898 Opened 5 years ago Updated 2 years ago

No tab icon, but sound audible

Categories

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

defect

Tracking

()

People

(Reporter: padenot, Assigned: alwu)

References

Details

Attachments

(2 files)

This is from bug 1608297, mentioned by the reporter there:

(In reply to kharwell from comment #17)

(In reply to Paul Adenot (:padenot) from comment #16)

Thank you very much for mentioning the icon problem, it's indeed of importance. Would there be a way for us to try to reproduce this

Yeah, you can actually use the fiddle code @jib created to replicate the original issue: https://jsfiddle.net/jib1/L2egv9u1/77/

Using that you should be able to hear audio, and then note there is no icon. Right click, and choose "mute tab". The icon appears (audio symbol with slash through it) overlaying the text, but audio can still be heard. Clicking the icon removes it completely (i.e. there is no enabled audio icon with no slash).

alastor, does this ring a bell?

Flags: needinfo?(alwu)

Will check it later, keep NI.

Assignee: nobody → alwu

This is a minor issue which I think we could solve in this release cycle.

Severity: normal → minor
Flags: needinfo?(alwu)
Priority: -- → P1

The only place to set media info is in MetadataLoaded(), which is after this check, so it makes no sense to check HasVideo() here. We should check if VideoTracks contains any video instead.

My current patch can fix the issue, but it would break a lots of test, so apparently I didn't fully understand the process of how media stream loads its media info.

The reason of this issue is that we didn't load the audio info for this media element [1], so we would think this media element is inaudible (no audio track), which causes an absence of sound indicator.

Paul, do you have any idea about why this media stream didn't load audio info successfully?

Thank you.

[1] https://searchfox.org/mozilla-central/rev/df94cd5ba431234bc220ac081def0801fe44b89e/dom/html/HTMLMediaElement.cpp#5865-5870

Flags: needinfo?(padenot)

It's always a bit weird, and not particularly well specced. What tests do you break?

Flags: needinfo?(padenot) → needinfo?(alwu)

Now I couldn't find that try result, but I remembered I broke a lots of test, not particular one.

In [1], my original thought is that, it check HasVideo(), which woul check mMediaInfo that could only be set in SetMediaInfo(). As SetMediaInfo() could only be called from MetadataLoaded() and CopyInnerTo(), and CopyInnerTo() doesn't look like a normal way we would call for loading a media element. Therefore, I assume that the only place of assigning media info to mMediaInfo is MetadataLoaded(), so checking HasVideo() before calling MetadataLoaded() seems wrong to me (because we haven't load the metadata, we would definitely not have video info)

But thing is weird, when I check the actual behavior of media stream, I found that HasVideo() would return true before we call MetadataLoaded() , and I don't understand why and how? because we haven't set the metadata, so where that video info came from? Is there any special place I miss where we would finish loading media info for media stream?

[1] https://searchfox.org/mozilla-central/rev/df94cd5ba431234bc220ac081def0801fe44b89e/dom/html/HTMLMediaElement.cpp#5865


And back to this issue, I don't know why we didn't load audio info for this stream...

Thank you so much.

Flags: needinfo?(alwu) → needinfo?(padenot)

Sorry I forgot this.

But thing is weird, when I check the actual behavior of media stream, I found that HasVideo() would return true before we call MetadataLoaded() , and I don't understand why and how? because we haven't set the metadata, so where that video info came from? Is there any special place I miss where we would finish loading media info for media stream?

What is setting it at true ? This wouldn't be my expectations either. I also don't think checking media info makes sense, as this is very dynamic, it all depends on when you check. It's best to check when things change (add a track, start a track, etc.).

rr and a watch point can probably help you understand when HasVideo changes in value and then you can find why.

Flags: needinfo?(padenot)
Flags: needinfo?(alwu)
Severity: minor → S4
Flags: needinfo?(alwu)
Priority: P1 → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: