cypress: Provided Chrome browser does not support DRM (widevine)
Current behavior:
When we try to play a DRM protected video in the chrome browser provided by cypress, our video player throws a error (drm/widevine is not supported
). The same video in ordinary chrome plays well.
Desired behavior:
The video plays well in the browser
Steps to reproduce:
cy.visit('https://demo.castlabs.com/')
Big buck Bunny > MPEG-DASH > DRM (video should start playing)
We have tried to set chromeWebSecurity: false
, but it did not help. A friend of mine is saying that this is most likely caused by the fact that the site is running in a iframe in the cypress chrome browser, so it might have something to do with security in iframes etc.
Versions
Cypress 3.0.1 Chrome 67
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 17
- Comments: 17 (2 by maintainers)
Cypress passes ‘–disable-component-update’ to Chrome on startup. I think that this prevents Widevine from being installed. Try filtering it out in the plugin file:
Note: this still won’t work in headless mode, Chrome --headless doesn’t support Widevine: https://bugs.chromium.org/p/chromium/issues/detail?id=788662
@jennifer-shehane We would appreciate some feedback, will this ticket be investigated anytime soon?
As mentioned above, playback of DRM content is critical for us. So far we have started writing tests for other functions of our application, but at some point of time we will need the DRM playback to work. If the DRM support will continue to be missing in cypress, any test writing efforts will be of waste and we will be forced to use another tool.
Hello @jennifer-shehane !
I’m lead developer for the web player of myCANAL and it would be awesome to have the DRM support in Cypress ! We just encountered the issue and we would be so disappointed to use another solution just because of that 😦
Thanks for your feedback ! You have an awesome product !
We are investigating if we can use
cypress
at Showmax and right now the absence of DRM support in Chrome is a blocker for us. Is there any development in this regard?“Nice” to hear that we are not the only ones suffering from this issue, let’s hope it helps to put prio on the investigation.
Hi @flotwig @jennifer-shehane - having issues with DRM in firefox, the workaround that @flotwig mentioned for Chrome helped fix the widevine issue for Chrome, but looks like the Browser settings for Firefox in Cypress Test Runner also incur issues installing widevine components, do you know if there is a browser setting for Firefox that will disable this?
Screenshots below:

What about firefox? It could be a workaround but it fails too, it tries to install components and never ends
I’ve looked into this issue a bit. Sorry, this is a bit of a brain dump. I think the takeaway is that the solution will not be an easy fix.
Here are the failing tests that should pass when DRM is supported correctly:
Castlabs has a fork of electron that provides VPM support which they seem to have no intention at the moment of pushing back upstream to Electron due to some closed source code.
For production use of the Castlabs fork, a license agreement with Google Widevine is needed to get production certificates for re-signing the final package - this requires filling out a ‘Contact Us’ form on the widevine site and seems to take a while to hear back from.
Visiting
chrome://components/
in Cypress Chrome:Visiting
chrome://components/
in non-Cypress Chrome:Resources: