Add support for playing HLS m3u8/m3u URLs

This commit is contained in:
Max Goodhart
2022-06-05 14:12:08 -07:00
parent bd1dc48574
commit fd75dba562
4 changed files with 13 additions and 1 deletions

View File

@@ -189,7 +189,12 @@ const viewStateMachine = Machine(
ensureValidURL(content.url)
const wc = view.webContents
wc.audioMuted = true
wc.loadURL(content.url)
if (/\.m3u8?$/.test(content.url)) {
wc.loadFile('playHLS.html', { query: { src: content.url } })
} else {
wc.loadURL(content.url)
}
},
},
},