canvas.captureStream() throwing NS_ERROR_NOT_INITIALIZED: error
Categories
(Firefox :: Untriaged, defect)
Tracking
()
People
(Reporter: badocha.hubert, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
Steps to reproduce:
<canvas></canvas>
<script>
var canvasElt = document.querySelector('canvas');
var stream = canvasElt.captureStream();
</script>
Actual results:
NS_ERROR_NOT_INITIALIZED: error was thrown
Expected results:
i should have get MediaStream from this element just like in chrome.
Code is from mozilla developer docs.
Code that works is
<canvas></canvas>
<script>
var canvasElt = document.querySelector('canvas');
var ctx = canvasElt.getContext("2d");
var stream = canvasElt.captureStream();
</script>
Hi Badocha,
Could you please provide us with a test page with the code and the specific steps so we can try to reproduce this issue on our end?
Please also test if this is reproducible in the latest Firefox Nightly version, you can download it from here: https://nightly.mozilla.org/.
If you still have the issue please create a new profile, you have the steps here: https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles?redirectlocale=en-US&redirectslug=Managing-profiles#w_starting-the-profile-manager
Please test if the issue is reproducible in safe mode, here is a link that can help you: https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
If there is any other info you can provide to help us figure out how we can can reproduce the issue please share them.
Thanks for your contribution.
| Reporter | ||
Comment 2•6 years ago
|
||
i wrote whole page twice in my issue one working on mozzila and chrome and one working only on chrome but taken straight outta mozilla docs. I'll check it on nightly tomorrow
Hi Badocha,
I wanted to check on this issue. Were you able to test this on Nightly? If the issue persists, please send us the steps we need to follow to reproduce it on our end, and if possible, attach to this ticket screenshots or screen recordings, it'll help us a lot.
Regards,
Due to the lack of information from the reporter I will close this issue as incomplete, but please reopen it if you have more information that might help us reproduce this issue as well. Thank you
| Reporter | ||
Comment 5•6 years ago
|
||
I'm confused a bit since in my initial report there is code to reproduce the issue.
So i' ll just copy and paste it.
Code according to mozilla developer docs:
<canvas></canvas>
<script>
var canvasElt = document.querySelector('canvas');
var stream = canvasElt.captureStream();
console.log(stream);
</script>
it results in error: NS_ERROR_NOT_INITIALIZED
both in normal firefox and nightly
code that works is
<canvas></canvas>
<script>
var canvasElt = document.querySelector('canvas');
var ctx = canvasElt.getContext("2d");
var stream = canvasElt.captureStream();
console.log(stream);
</script>
so in firefor one nedd to getContext of canvas before capturing stream what is not required in chrome and according to mozzila developer's docs.
| Reporter | ||
Comment 6•6 years ago
|
||
https://www12.zippyshare.com/v/wOrpUXqZ/file.html
here's link to screenshots both in nightly and normal
Just ran into this myself. Here's a repro: https://codepen.io/dbriggs/pen/xxbdrML.
Looks like canvas.captureStream() doesn't work unless you've already called canvas.getContext(). Not sure if this is intended or not.
Updated•4 years ago
|
Description
•