#!/usr/bin/env bash
set -euo pipefail
# Open player.html through the thread file tree first, then supply the session and output.
session="$1"
output="$2"
play_x="$3"; play_y="$4"; voice_x="$5"; voice_y="$6"
agent-device record start "$output" --session "$session"
agent-device press "$play_x" "$play_y" --session "$session"
sleep 4
agent-device press "$voice_x" "$voice_y" --session "$session"
sleep 4
agent-device record stop --session "$session"
