Closed Bug 1599938 Opened 4 years ago Closed 4 years ago

Implement fetch image helper

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

Details

(Whiteboard: [media-feature])

Attachments

(1 file)

We would do that algorithm in chrome process, then select a image for the virtual media control interface.

https://w3c.github.io/mediasession/#fetch-image-algorithm

Could we stop at point 4 and just pass the src URL to the Platform?
I don't know about Mac OS X and Android, but for Windows and Linux we can safely pass such an URL.

That way we could shift all of the responsabilities down to the Platform.
Otherwise we'd need a temporary directory which needs to be cleaned up, maybe even needs a maximum size limit etc.
Specifically for MPRIS, where we would download a file just to build up a file:/// URL again.

This is maybe something to consider there, UNLESS we ever want to display the artwork within the user agent of some sort.

That is just a recommended way, and I think we won't follow that 100%. This bug is filed for a purpose to ensure that we would feed the event source with artwork url.

Priority: P2 → P3
Whiteboard: [media-feature]

Per bug1623971 comment9, we have to fetch the image inside Gecko, instead of letting external framework to load the URL directly.

Assignee: nobody → alwu
Blocks: 1623971

We will implement a fetch-image-helper in this class, then the platform event source can selecte the preferred-size artwork and get the image by using this helper.

Summary: Implement MediaSession's fetch image algorithm → Implement fetch image helper

The notification of the reply [1] on Phabricator is easily to miss, so I also set NI here. Thank you.

[1] https://phabricator.services.mozilla.com/D69288#2114435

Flags: needinfo?(amarchesini)
Depends on: 1628929

A quick update, I found a memory leak issue in the imgTool so I spent some time on that, and will solve that issue in bug1628929 before fixing this bug.

Flags: needinfo?(amarchesini)
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/645373573077
Implement a helper class to fetch image data from URL r=ckerschb,kershaw
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: