Skip to content

Source element missing moving steps for media elements #12879

Description

@lukewarlow

What is the issue with the HTML Standard?

The HTML spec defines moving steps for the <source> element but only does something when that source is inside of a picture element.

However, both Chromium and Firefox seem to run extra code to ensure that media elements' resource selection algorithm is ran.

Example HTML:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Dynamic video source demo</title>
</head>
<body>
<source id="source" src="https://c2d10ca4-ef3a-464b-83d1-97693b5434c8.mdnplay.dev/shared-assets/videos/flower.webm" type="video/webm">
<video id="video" controls autoplay muted></video>

<script>
  video.moveBefore(source, undefined);
</script>
</body>
</html>

In Chromium and Firefox this video plays, but per the current spec I don't think it should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions