Autoplay does not work if Video element is appended as part of a Fragment

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
4 years ago
3 years ago

People

(Reporter: WittigMarcus, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox40 ?)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

Steps to reproduce:

As part of my application I am creating a media preview of the user media acquired by getUserMedia(). When I use jQuery.append() the video element does not autoplay with FF while it does with Chrome. Having investigated this further, FF does not autoplay the video element if it is appended to a document fragment and the fragment then is added to the document. This is basically what query.append() does. 

To demonstrate the issue I have written a test application with to demonstrate 5 methods to append the media element. The test application provides three push buttons to choose the method for appending the video element:
1: $('body').append(element)
2: document.body.appendChild(element)
3: document.body.appendChild(document.createDocumentFragment().appendChild(element))

Steps to reproduce
1: Load http://jsfiddle.net/WittigMarcus/w9u1sa62/ on a computer with webcam and audio available
2: Push the buttons to see the result


Actual results:

1: no video
2: video is autoplaying
3: no video


Expected results:

all three should have played as it does with Chrome, for example.
(Reporter)

Updated

4 years ago
Component: General → General
Product: Core → Firefox
(Reporter)

Updated

4 years ago
Component: General → Video/Audio
Product: Firefox → Core
(Reporter)

Updated

3 years ago
Component: Audio/Video → Layout
Version: 34 Branch → Trunk
(Reporter)

Comment 1

3 years ago
[Tracking Requested - why for this release]:
status-firefox40: --- → ?
(Reporter)

Comment 2

3 years ago
Bug still exists with FF40
You need to log in before you can comment on or make changes to this bug.