Skip to content

Commit aa29a3f

Browse files
committed
LibWeb/HTML: Update resource fetch algorithm to match current spec
Changes from whatwg/html#10792 No code changes, only comments.
1 parent 30d23ad commit aa29a3f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Libraries/LibWeb/HTML/HTMLMediaElement.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -936,17 +936,20 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::fetch_resource(URL::URL const& url_r
936936
auto& realm = this->realm();
937937
auto& vm = realm.vm();
938938

939-
// 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
940-
// object, then let mode be local. Otherwise let mode be remote.
941-
// FIXME: Detect media provider object / blob URLs with a media provider object.
939+
// 1. Let mode be remote.
942940
auto mode = FetchMode::Remote;
943941

944-
// 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
942+
// FIXME: 2. If the algorithm was invoked with media provider object, then set mode to local.
943+
// Otherwise:
944+
// 1. Let object be the result of obtaining a blob object using the URL record's blob URL entry and the media
945+
// element's node document's relevant settings object.
946+
// 2. If object is a media provider object, then set mode to local.
947+
// 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
945948
// current media resource be the resource given by the media provider object. Either way, the current media resource is now the element's media
946949
// resource.
947-
// FIXME: 3. Remove all media-resource-specific text tracks from the media element's list of pending text tracks, if any.
950+
// FIXME: 4. Remove all media-resource-specific text tracks from the media element's list of pending text tracks, if any.
948951

949-
// 4. Run the appropriate steps from the following list:
952+
// 5. Run the appropriate steps from the following list:
950953
switch (mode) {
951954
// -> If mode is remote
952955
case FetchMode::Remote: {

0 commit comments

Comments
 (0)