mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-10-21 16:42:43 +00:00
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user