diff --git a/webroot/js/player.js b/webroot/js/player.js index 37c3d73..b3fdc32 100644 --- a/webroot/js/player.js +++ b/webroot/js/player.js @@ -91,7 +91,11 @@ window.addEventListener('DOMContentLoaded', (event) => { console.log('selected audio format', audioFormat); fps = videoFormat.fps; - + + if (searchParams.get("q") != null) { // sloppy but idc + videoFormat = formats.find((fmt) => fmt.format_id == searchParams.get("q")); + audioFormat = null; + } selectStreams(videoFormat, audioFormat) } video.preload="auto"; diff --git a/webroot/watch.shs b/webroot/watch.shs index d4cc727..4c4772d 100755 --- a/webroot/watch.shs +++ b/webroot/watch.shs @@ -35,6 +35,7 @@ if [[ "${get_data[v]}" ]]; then "vcodec": "vp8", "acodec": "vorbis" }]' + subs='[]' if [[ "${r[host]}" == "${cfg[flash_host]}" ]]; then url='http://f.sakamoto.pl/videoplayback_.flv' fi