2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-22 18:18:55 +00:00

Fix app not starting since widevine PR / #1164 (#1170)

This commit is contained in:
Ronan Jouchet 2021-04-30 01:23:13 -04:00 committed by GitHub
parent ec0ea4bd67
commit c4356e48f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,22 +190,25 @@ if (shouldQuit) {
}
});
if (appArgs.widevine !== undefined) {
// @ts-ignore This event only appear on the widevine version of electron, which we'd see at runtime
app.on('widevine-ready', (version, lastVersion) => {
if (appArgs.widevine) {
// @ts-ignore This event only appears on the widevine version of electron, which we'd see at runtime
app.on('widevine-ready', (version: string, lastVersion: string) => {
console.log('widevine-ready', version, lastVersion);
onReady();
});
// @ts-ignore This event only appear on the widevine version of electron, which we'd see at runtime
app.on('widevine-update-pending', (currentVersion, pendingVersion) => {
console.log(
`Widevine ${currentVersion} is ready to be upgraded to ${pendingVersion}`,
);
});
app.on(
// @ts-ignore This event only appears on the widevine version of electron, which we'd see at runtime
'widevine-update-pending',
(currentVersion: string, pendingVersion: string) => {
console.log(
`Widevine ${currentVersion} is ready to be upgraded to ${pendingVersion}`,
);
},
);
// @ts-ignore This event only appear on the widevine version of electron, which we'd see at runtime
app.on('widevine-error', (error) => {
// @ts-ignore This event only appears on the widevine version of electron, which we'd see at runtime
app.on('widevine-error', (error: any) => {
console.error('WIDEVINE ERROR: ', error);
});
} else {