forked from Quacky2200/Spotify-Web-Player-for-Linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugins.js
executable file
·34 lines (33 loc) · 1.23 KB
/
plugins.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const path = require("path")
/**
* @author Matthew James <[email protected]>
* Plugins insertion function
*/
module.exports = function(app){
/**
* Pepper Flash Player & Widevine are required plugins for Spotify Web Player to play music
*/
var pluginName = null;
switch(process.platform){
case 'win32':
case 'win64':
pluginName = 'pepflashplayer.dll'
break
case 'darwin':
pluginName = 'PepperFlashPlayer.plugin'
break
case 'linux':
pluginName = 'libpepflashplayer-' + process.arch + '.so'
break
default:
console.log('No available flash plugin can be used for this platform. Exiting...');
process.exit(1);
}
app.commandLine.appendSwitch('ppapi-flash-path', `${__dirname.replace(`${path.sep}app.asar`, '')}/plugins/${pluginName}`);
//Optionally specify flash version, for example, v17.0.0.169
//app.commandLine.appendSwitch('ppapi-flash-version', '20.0.0.306');
//These may be necessary when Spotify decides to move to pure HTML5 DRM
//app.commandLine.appendSwitch('widevine-cdm-path', __dirname + '/plugins/widevinecdmadapter.so');
// The version of plugin can be got from `chrome://plugins` page in Chrome.
//app.commandLine.appendSwitch('widevine-cdm-version', ' 1.4.8.824');
}