[Webkit-unassigned] [Bug 271629] New: <video> elements moved out of a <template> immediately fail to load all candidate resources

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 25 06:59:20 PDT 2024


            Bug ID: 271629
           Summary: <video> elements moved out of a <template> immediately
                    fail to load all candidate resources
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mail at jhnet.co.uk

Created attachment 470586

  --> https://bugs.webkit.org/attachment.cgi?id=470586&action=review

A demo HTML page with a button which, when clicked, moves a <video> element out of a <template> and onto the page..

# Environment

Epiphany 45.3, Arch Linux.

# Steps to reproduce:

When a <video> element is moved out of a <template> element (e.g. using .append(...)), the video will fail to play.

A demo HTML page is attached which does exactly the above when a button is clicked.

# Actual results:

When the 'Move video out of template' button is clicked, the video element is moved into the document but no video plays.

# Expected results:

The video should have loaded and played as usual.

NB: If the sample video element is placed on the page (i.e. outside the <template>) it plays correctly -- this is not a video format support issue.

A similar issue appears to be present in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1887573

The issue does not occur in Chromium.

# Workaround

For others impacted, the following workaround may be used immediately after inserting the element into the document to restore function:

const innerHTML = video.innerHTML;
video.innerHTML = "";
video.innerHTML = innerHTML;

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240325/4736bacd/attachment-0001.htm>

More information about the webkit-unassigned mailing list