by Daniele Di Lucido
May 26, 2020
Blog
How to use Cypress with encrypted streaming?
I won’t waste your time by explaining why Cypress is an amazing framework, and why you should have automated E2E tests. If you are here, it is because you already know all of this.
The issue
We decided to adopt Cypress to build an automated test suite to avoid regressions, increase the developer’s confidence, and maintain a stable codebase. After a few tests, we hit a stumbling block.
We weren’t able to test our players and our content because our clients use DRM content (CypressGitHub issue).
Browsers use External Components like “Widevine Content Decryption Module” to resolve DRM content. In Cypress, however, all the browser external components are disabled.
This will cause an exception in the Players while it’s resolving the content.
As you can imagine, for a streaming app it is crucial to be able to test the players and their logic, and this put us in front of a tough decision, give up on Cypress and automated tests, or find a solution!
How do we handle that?
After hours of crazy research and days of frustration, we came up with a simple question:
Do we really need it?
In our tests, we usually stream video content in order to check some business logic or to assert that the player is acting as intended. (We are not testing the actual encoding of the content or similar).
Then we faced the ugly/beautiful truth. No, you don’t need a DRM content to test that!
When we came to this mind blowing conclusion, we decided to mock the service that returns all the streaming information.
We created a JSON file to mock the streaming information that will use a clear content “Big Buck Bunny: the Dark Truths”
cypress/mock/streamingInfo.json
And stub the service that returns the streaming information in our tests:
And voilà , you are ready to stream 🍿
Note: Our projects are using Cypress v3.2.2, at the time of writing.
Norigin Media Attending Demuxed 2025 in London
We’re excited to announce that Norigin Media will attend Demuxed 2025 in London, the global video engineering conference for streaming professionals. Connect with us to talk about OTT app development, Smart TV apps, and the future of streaming.
What Video Players Are Best for Smart TV Apps?
Choosing the right video player is critical for Smart TV and CTV apps. Explore native, open-source, and commercial players, and see how Norigin Media helps integrate, optimize, and certify your player across all major Smart TV platforms.
Norigin Spatial Navigation Shortlisted for IABM’s Community Impact Award at IBC2025
Norigin Spatial Navigation, Norigin Media’s open-source Smart TV and CTV UX technology, is shortlisted for the IABM Community Impact Award at IBC2025, delivering intuitive, accessible content navigation across TV apps and OTT platforms.
SoundCloud Partners with Norigin Media for CTV Expansion
SoundCloud expands to Connected TVs with Norigin Media, offering music fans a new streaming experience on the big screen with a custom-designed CTV app.
IABM appoints Norigin Media to Members’ Board
Norigin Media CEO Ajey Anand has been appointed to the 2025 IABM Members’ Board, joining global industry leaders to shape the future of broadcast and media technology.
Norigin Media Confirmed to Exhibit at the DPP Leaders’ Briefing 2024
Oslo, Norway 8th November 2024:Â Norigin Media is delighted to announce that it will be exhibiting at the DPP Leaders’ Briefing 2024, happening in person on the 20-21 November.





