-
Notifications
You must be signed in to change notification settings - Fork 27
Make a more explicit call to fetch, including options such as destination and mode #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
index.bs
Outdated
| <dfn>preferred artwork image</dfn> from <var>metadata</var>'s | ||
| {{MediaMetadata/artwork}} of the <a>active media session</a>. | ||
| </li> | ||
| <li>Let <var>request</var> be a new [=request=] whose URL is the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably use [=request/URL=], [=request/mode=] and such here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
index.bs
Outdated
| {{MediaMetadata/artwork}} of the <a>active media session</a>. | ||
| </li> | ||
| <li>Let <var>request</var> be a new [=request=] whose URL is the | ||
| <a>preferred artwork image</a>'s {{MediaImage/src}}, destination |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This state seems to come out of nowhere? Also, it looks like MediaImage/src is a string that needs to be parsed into a URL first? What happens if that fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src is being parsed when setting the metadata. It is true it is a bit confusing since {{MediaImage/src}} here contains a properly parsed URL and not a USVString. Maybe there is a better way of doing things.
4def6b7 to
9dc2811
Compare
annevk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess reworking that has to be a follow-up, but you can't just assign the result of the URL parser to a dictionary member that contains a string. It would be better if you had some specification-internal struct (https://infra.spec.whatwg.org/#structs) to hold the data after processing.
Another thing that seems broken is the amount of ambient state. The fetch image algorithm has no parameters, but somehow has access to all kinds of state.
But the change in question here seems reasonable amid the questionable things.
|
@steimelchrome, any thoughts?
Yep agreed.
Do you mean that this algorithm should take a MediaSession object as input for instance? |
|
Yeah probably, it needs something to start its operations from and communicate back to. |
steimelchrome
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay was OOO for a bit. Yep, this looks reasonable to me. Thanks!
Fixes #346
Preview | Diff