Switch to shaka-player and initialize it on pageload.

Maybe todo: more testing and re-check if the stream has started after the page has already loaded
This commit is contained in:
knotteye
2020-10-18 09:23:28 -05:00
parent 34d6fa91df
commit 2de486da46
8 changed files with 96 additions and 117 deletions

View File

@@ -59,6 +59,13 @@ async function init(){
await initAPI();
//static files if nothing else matches
app.use(express.static(config['http']['directory']));
//Fake static files
app.get('/shaka-player.compiled.js', (req, res) => {
res.sendFile(process.cwd()+'/node_modules/shaka-player/dist/shaka-player.compiled.js');
});
app.get('/shaka-player.compiled.map', (req, res) => {
res.sendFile(process.cwd()+'/node_modules/shaka-player/dist/shaka-player.compiled.map');
});
//client-side site routes
if(!config['http']['server_side_render'])
await initFE();