Skip to content

Commit

Permalink
LibWeb/HTML: Update resource fetch algorithm to match current spec
Browse files Browse the repository at this point in the history
Changes from whatwg/html#10792

No code changes, only comments.
  • Loading branch information
AtkinsSJ committed Dec 18, 2024
1 parent 82c489f commit b63b9f8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Libraries/LibWeb/HTML/HTMLMediaElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,17 +936,20 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::fetch_resource(URL::URL const& url_r
auto& realm = this->realm();
auto& vm = realm.vm();

// 1. If the algorithm was invoked with media provider object or a URL record whose blob URL entry is a blob URL entry whose object is a media provider
// object, then let mode be local. Otherwise let mode be remote.
// FIXME: Detect media provider object / blob URLs with a media provider object.
// 1. Let mode be remote.
auto mode = FetchMode::Remote;

// FIXME: 2. If mode is remote, then let the current media resource be the resource given by the URL record passed to this algorithm; otherwise, let the
// FIXME: 2. If the algorithm was invoked with media provider object, then set mode to local.
// Otherwise:
// 1. Let object be the result of obtaining a blob object using the URL record's blob URL entry and the media
// element's node document's relevant settings object.
// 2. If object is a media provider object, then set mode to local.
// FIXME: 3. If mode is remote, then let the current media resource be the resource given by the URL record passed to this algorithm; otherwise, let the
// current media resource be the resource given by the media provider object. Either way, the current media resource is now the element's media
// resource.
// FIXME: 3. Remove all media-resource-specific text tracks from the media element's list of pending text tracks, if any.
// FIXME: 4. Remove all media-resource-specific text tracks from the media element's list of pending text tracks, if any.

// 4. Run the appropriate steps from the following list:
// 5. Run the appropriate steps from the following list:
switch (mode) {
// -> If mode is remote
case FetchMode::Remote: {
Expand Down

0 comments on commit b63b9f8

Please sign in to comment.