Playing Netflix in Electron - Widevine CDM - Can't get it to work


#1

Issue

I’m trying to get Netflix to play within my electron app, but I’m having issues getting widevine working.

So far I’ve followed the instructions at http://electron.atom.io/docs/tutorial/using-widevine-cdm-plugin/ but I haven’t been able to get it working.

Screenshots

My code is basically the same as the example in the widevine doc:

What I have tried

Code

const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow

const path = require('path')
const url = require('url')

let mainWindow

let wideVineDrmDir = path.join(__dirname, 'WidevineCdm', '_platform_specific', 'win_x86', 'widevinecdmadapter.dll');
app.commandLine.appendSwitch('widevine-cdm-path', wideVineDrmDir);
app.commandLine.appendSwitch('widevine-cdm-version', '1.4.8.893');

function createWindow () {
  mainWindow = new BrowserWindow({
    webPreferences: {
      plugins: true
    }
  });
  
  //Any of these have the same issue
  //mainWindow.loadURL(`file://${path.join(__dirname, 'index.html')}`);
  //mainWindow.loadURL('https://bitmovin.com/mpeg-dash-hls-drm-test-player/');
  //mainWindow.loadURL('https://shaka-player-demo.appspot.com/');
  //mainWindow.loadURL('https://netflix.com/');


app.on('ready', createWindow)

Notes

I have widevinecdmadapter.dll version 1.4.8.893 from the same major version of Chrome as electron. I am using Chrome version 53.0.2785.143 and Electron version 1.4.13.

Note: The major version of Chrome browser has to be the same with the Chrome version used by Electron, otherwise the plugin will not work even though navigator.plugins would show it has been loaded.


I’ve checked the 3 places mentioned in the doc

  • Open devtools and check whether navigator.plugins includes the Widevine CDM plugin.
    

It does show up correctly

[Screenshot removed because there’s a limit for new users]

  • Open shaka-player-demo.appspot.com and load a manifest that uses Widevine.
    

I am not able to do this as its greyed out.

[Screenshot removed because there’s a limit for new users]

  • Open dash-player.com/demo/drm-test-area/ [Link mangled as there's a link limit as well apparently], check whether the page says bitdash uses Widevine in your browser, then play the video.
    

It does say Widevine is enabled, however I am not able to play the video.


If anyone has any ideas or has been able to get this to work I would appreciate any input. Since it’s in the offical docs, I assume someone has?

Thanks!


Possible to run Netflix in electron?
#2

I finally got it to work after 3 days of trying and trying, contact me on Skype (username LeParadoxHD) and I will help you.