|
@@ -9,6 +9,7 @@ const path = require('path')
|
|
|
const url = require('url')
|
|
|
|
|
|
const MEDIA_ERR_SRC_NOT_SUPPORTED = 4
|
|
|
+const FIVE_MINUTES = 5 * 60 * 1000
|
|
|
|
|
|
let window
|
|
|
|
|
@@ -23,7 +24,7 @@ app.once('ready', () => {
|
|
|
pathname: path.resolve(__dirname, 'asar', 'video.asar', 'index.html')
|
|
|
}))
|
|
|
|
|
|
- ipcMain.on('asar-video', function (event, message, error) {
|
|
|
+ ipcMain.on('asar-video', (event, message, error) => {
|
|
|
if (message === 'ended') {
|
|
|
console.log('Video played, proprietary codecs are included')
|
|
|
app.exit(1)
|
|
@@ -38,4 +39,9 @@ app.once('ready', () => {
|
|
|
console.log(`Unexpected response from page: ${message} ${error}`)
|
|
|
app.exit(1)
|
|
|
})
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ console.log('No IPC message after 5 minutes')
|
|
|
+ app.exit(1)
|
|
|
+ }, FIVE_MINUTES)
|
|
|
})
|