From fb1bb6509894037c28a8249ce084a330cd44b6d3 Mon Sep 17 00:00:00 2001 From: David Halls Date: Tue, 31 Aug 2021 22:53:09 +0100 Subject: [PATCH] Enable camera switch when portrait locked --- run_http_server.sh | 6 +++++- site/example.js | 7 ++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/run_http_server.sh b/run_http_server.sh index 1894fb5..b2e77b7 100755 --- a/run_http_server.sh +++ b/run_http_server.sh @@ -1,3 +1,7 @@ #!/bin/bash cd "$(dirname "$0")/site" -serve -S -l tcp://0.0.0.0 --ssl-cert ../certs/server.crt --ssl-key ../certs/server.key +if test "$1" = "--https"; then + serve -S -l tcp://0.0.0.0 --ssl-cert ../certs/server.crt --ssl-key ../certs/server.key +else + serve -S -l tcp://0.0.0.0 +fi diff --git a/site/example.js b/site/example.js index 86461de..07b4648 100644 --- a/site/example.js +++ b/site/example.js @@ -281,12 +281,11 @@ async function start() { canvas_el.style.width = `${width}px`; canvas_el.style.height = `${height}px`; // TODO: - // chrome inspect not working // select which camera to use (front/rear)? - // test fix for going small while rotating (switching?) // option to switch audio as well // audio source has two channels even though media stream is mono - check what's recorded // allow select audio and video devices + // await navigator.mediaDevices.enumerateDevices() // mute option + // hide camera option |<- these input list along with audio and video devices? // audio/video source option + @@ -491,9 +490,7 @@ async function start() { this.end(true); } waiting_el.classList.add('d-none'); - if (!lock_portrait) { - camera_swap_el.classList.remove('d-none'); - } + camera_swap_el.classList.remove('d-none'); canvas_el.classList.remove('invisible'); go_live_el.disabled = false; update();