Describe the bug
It is not possible to capture / record a restricted video because it is disabled in the official Firefox source code (captureStream API is disabled for DRM with Widevine / EME).
The restriction / censorship source code seems to be currently located at line 3757 in the function HTMLMediaElement::CanBeCaptured of the file https://searchfox.org/mozilla-central/source/dom/html/HTMLMediaElement.cpp#3757:
// Prevent capturing restricted video
if (aCaptureType == StreamCaptureType::CAPTURE_ALL_TRACKS &&
ContainsRestrictedContent()) {
return false;
}
return true;
Removing the if code block and recompiling should fix the issue.
To Reproduce
var video = document.getElementsByTagName("video")[0];
var stream = video.captureStream ? video.captureStream() : video.mozCaptureStream();
You can see that this code will not produce an error when replacing the value of the Content Url field with a video stream without DRM like https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd (video example from dash.js player) while removing the value of the Proxy Server Url field.
There is also no error when playing a video stream without DRM directly on dash.js player or Shaka Player.
Update: I noticed that it is actually possible to capture / record a Widevine DRM video on Firefox if we capture the stream before pressing the play button. But it would be nice to be able to do it if the stream is already playing like on videos without DRM.
Expected behavior
Since Waterfox is designed with user choice in mind, it should not prevent capturing restricted video. Like it could be done if people would customize and compile the Firefox source code.
My configuration
It seems you don't comprehend the R in DRM.
@Squall-Leonhart it is like recording a computer screen (but closer to the source), as long as it is for personal usage and we just want to continue watching a video offline instead of online, it is fine. There is no need to add restrictions in an open source web browser. It would be like adding a restriction to a screen recorder software to prevent people from recording DRM videos, this does not exist.
you don't have the RIGHT.
@Squall-Leonhart Legislation has upheld the right of individuals to record live TV and streaming media for personal use. You don't have the right to share or sell the content you have recorded. This is actually why DRM is widely considered unethical and anti consumer
They also upheld anti-circumvention technologies, if a DRM is in place, you don't have the right to bypass it.
Only partially correct the anti circumvention aspect only ever comes into play typically when the individuals who invent the circumvention publish it or provide the methods of decryption to pirates. It is a fundamentally unenforceable law when applied to personal copying and recordings because its impossible to actually prove someone did it unless they engage in criminal behavior like sharing or selling said content or publishing exploits publicly. Which os why the anti circumvention part of the law is fundamentally flawed and why upholding it sets a dangerous legal precedent, And why you typically don't see it enforced except as a way to trump up charges on a more serious copyright case. Either way I support this function
@Squall-Leonhart there are also projects hosted on GitHub for open source software like Calibre, that allow to remove DRM protection on eBooks, there is no problem with that: https://github.com/apprenticeharper/DeDRM_tools
In the case of Waterfox / Firefox, we just need to remove the hardcoded restriction, the DRM will still be present in the content.
don't care.
/close this
Most helpful comment
@Squall-Leonhart Legislation has upheld the right of individuals to record live TV and streaming media for personal use. You don't have the right to share or sell the content you have recorded. This is actually why DRM is widely considered unethical and anti consumer