diff options
author | Mario <mario@mariovavti.com> | 2020-11-05 08:46:42 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-11-05 08:46:42 +0000 |
commit | bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch) | |
tree | 8929845be585b09d0f420621281c5531e1efad3e /vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh | |
parent | 6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff) | |
parent | fdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff) | |
download | volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.gz volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.bz2 volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.zip |
Merge branch '5.0RC'5.0
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh b/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh index 829ce9b3b..d6bee1da7 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh +++ b/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh @@ -1,15 +1,27 @@ #!/bin/sh +if [ "$1" = -t ]; then + BIN='/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver' + shift +else + BIN=safaridriver +fi + +SCREEN='Capture screen' + if [ -z "$1" ]; then - echo 'Please select the input device by entering its [index] number:' >&2 - ffmpeg -f avfoundation -list_devices true -i - 2>&1 | grep screen >&2 - read -r INDEX + OUTPUT=$(ffmpeg -f avfoundation -list_devices true -i - 2>&1 | grep "$SCREEN") + if [ "$(echo "$OUTPUT" | grep -c ^)" -gt 1 ]; then + echo 'Please select the input device by entering its [index] number:' >&2 + echo "$OUTPUT" >&2 + read -r INDEX + fi else INDEX=$1 fi echo 'Starting safaridriver on 127.0.0.1:4444 ...' >&2 -safaridriver -p 4444 & pid=$! +"$BIN" -p 4444 & pid=$! # shellcheck disable=SC2064 trap "kill $pid; exit" INT TERM @@ -25,7 +37,7 @@ mjpeg-server -a 127.0.0.1:9000 -- ffmpeg \ -capture_cursor 1 \ -r "${FPS:-15}" \ -pixel_format yuyv422 \ - -i "$INDEX" \ + -i "${INDEX:-$SCREEN}" \ -f mpjpeg \ -q "${QUALITY:-2}" \ - |