Closed Bug 1615112 Opened 6 years ago Closed 6 years ago

Ensure the metadata we give to the event source would always contains title and artwork

Categories

(Core :: Audio/Video: Playback, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

Details

Attachments

(3 files)

Fork from [1]. As it's ok to set only title or only artwork in the media session metadata, that would cause lacking to show some information in the virtual controller.

Therefore, we should ensure that the metadata we give to the event source would always contains title and artwork. We could use website title as default title and default favicon as default artwork.

[1] https://phabricator.services.mozilla.com/D47546#inline-376020

Well, actually the Event Source should be capable of getting separate metadata (specifically Windows SMTC is designed that way with the comment you linked).
Windows splits between setting the artwork and the title and I just didn't implictly call either, so we have the chance to set them together (i.e. Title and Favicon), in order to prefent flickering or a title appearing and the artwork popping up much later.

For MPRIS, the metadata can be set as we want as well.

So we should probably only set them together when we get them together but setting them separately in case of Media Session.

I can't speak for Mac OS though.

From API design pespective, I agree with that. But from user pespective, I don't think there is any benefit to set title or artwork only. If we would like to show some information to user, then that should be complete.

But that also means that MediaSession has no way of setting only one of those metadata, like if they for some reason don't want any artwork, they are forced to have a blurry version of their favicon.

I can't think of cases where it would really "hurt" to have the favicon or the website title as override, but maybe there is?
I mean for a video you generally might not have many artwork, for advertisments, for most music.

That being said, I accept both, but maybe someone can come up with a case where this isn't desired.
On the other hand, the favicon as default never hurts as then the user knows what tab is controlled :)

(In reply to Marc Streckfuß [:MeFisto94] from comment #3)

But that also means that MediaSession has no way of setting only one of those metadata, like if they for some reason don't want any artwork, they are forced to have a blurry version of their favicon.

They still can, we didn't restrict what they can do. We won't use their favicon in this situation, I would choose to use our default favicon icon [1]

[1] https://searchfox.org/mozilla-central/source/toolkit/themes/shared/places/defaultFavicon.svg

Depends on: 1611328

I would reduce the priority of this bug and maybe target it on the next cycle because I would like to finish getting the metadata from media session first.

Priority: P1 → P3
Blocks: 1620340
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/63aea2506c03 part1 : create 'GetDefaultTitle()'. r=MeFisto94 https://hg.mozilla.org/integration/autoland/rev/e26028b01ac4 part2 : use default title and favicon to fill missing properties if needed. r=MeFisto94 https://hg.mozilla.org/integration/autoland/rev/093d00e6052e part3 : add test. r=MeFisto94
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: