whatwg / whatwg/html

Media element resource selection algorithm: resolve the URL lazily, matching implementations

Open
#798 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic: media
Dominant language
HTML
Stars
9.4k
Forks
3.2k
Avg merge
3d 9h
Merged PRs (30d)
38

Description

https://html.spec.whatwg.org/multipage/embedded-content.html#concept-media-load-algorithm

The problem exists in two places:

"Let urlString be the resulting URL string that would have resulted from parsing the URL specified by the src attribute's value relative to the media element's node document when the src attribute was last changed."

"Let urlString be the resulting URL string that would have resulted from parsing the URL specified by candidate's src attribute's value relative to the candidate's node document when the src attribute was last changed."

I never implemented this in Presto, and it's not what happens in WebKit or Blink either. Instead the URL is just resolved right then and there. There's a difference when the document's base URL changes in between the two times, but it doesn't seem to matter in practice.

@padenot, what does Gecko do?

@DigiTec, who's a good contact for media element issues in Edge?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the media element resource selection algorithm at the linked HTML Standard section. Investigate how Gecko, WebKit, Blink, and Edge resolve media URLs when the document base URL changes, then determine whether the specification should match implementations or retain lazy resolution; done means a documented decision and corresponding specification update.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
web-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.