Closed Bug 1425643 Opened 6 years ago Closed 5 years ago

'canplay' never fired for video element lacking 'autoplay' attribute with MediaStream

Categories

(Core :: WebRTC: Audio/Video, defect, P2)

57 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1306999

People

(Reporter: bugzilla, Assigned: pehrsons)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36

Steps to reproduce:

Repro steps:
0. Make sure a webcam is connected and go to https://jsfiddle.net/zt31up42/5/
1. Check "Video" checkbox
2. Check "Camera" or "Canvas" -- doesn't seem to matter which.
3. Press "Start" button


Actual results:

In FF, we never arrive into the the 'canplay' handler (see top of jsfiddle js) and the video never plays.


Expected results:

In chrome, we arrive in the 'canplay' handler at the top of the js file, and it works as expected. The video starts playing.

See top of js file for additional details.
Summary: 'canplay' sometimes never fired for video element lacking 'autoplay' attribute → 'canplay' never fired for video element lacking 'autoplay' attribute
Updated fiddle url: https://jsfiddle.net/zt31up42/
Please use that one for repro steps.
Apologies, jsfiddle newb, here!

Use https://jsfiddle.net/zt31up42/6/ as the repro.
I can repro in Nightly, Linux (20180111100722).
Status: UNCONFIRMED → NEW
Rank: 15
Ever confirmed: true
Priority: -- → P2
Assignee: nobody → apehrson
Status: NEW → ASSIGNED

This came up on stackoverflow yesterday. The following is a seductive pattern that apparently exists:

video.oncanplay = video.play;

This works in Chrome but not in Firefox because of this bug. We should probably give this some attention.

Here's a simpler fiddle: https://jsfiddle.net/jib1/gxbfoL3y/

Rank: 15 → 14

TBK, this problem seems limited when the source is a MediaStream. canplay is reached with regular video without autoplay.

Summary: 'canplay' never fired for video element lacking 'autoplay' attribute → 'canplay' never fired for video element lacking 'autoplay' attribute with MediaStream

This will get solved by bug 1306999.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.