[Webkit-unassigned] [Bug 181663] New: Video Element cannot playback local Canvas.captureStream
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 15 19:03:29 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=181663
Bug ID: 181663
Summary: Video Element cannot playback local
Canvas.captureStream
Product: WebKit
Version: Safari 11
Hardware: Unspecified
OS: iOS 11
Status: NEW
Severity: Normal
Priority: P2
Component: WebRTC
Assignee: webkit-unassigned at lists.webkit.org
Reporter: adam at tokbox.com
CC: youennf at gmail.com
If you use Canvas.captureStream and pass the stream to a video element srcObject you just get a blank video. It works in Safari on Mac OS, just not on iOS.
Example code:
const videoEl = document.createElement('video');
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
canvas.width = 640;
canvas.height = 480;
const randomColour = () => {
return Math.round(Math.random() * 255);
};
setInterval(function() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = `rgb(${randomColour()}, ${randomColour()}, ${randomColour()})`;
ctx.fillRect(0, 0, canvas.width, canvas.height);
}, 1000);
document.body.appendChild(canvas);
document.body.appendChild(videoEl);
videoEl.srcObject = canvas.captureStream(1);
videoEl.setAttribute('playsinline', '');
videoEl.play();
You can see the example running at: http://jsbin.com/nopusa
You are expected to see a Canvas element and a Video Element both with random colours being updated every 1 second. But on iOS it updates on the Canvas but not on the Video Element.
--
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/20180116/8729d502/attachment.html>
More information about the webkit-unassigned
mailing list