+head -n1 "$meta" |read length width height TITLE
+
+debug VIDEO: $video
+
+if [ "$_COOKIE[watch]" = raspi ]; then
+ actionuri="//${RHOST}:${RPORT}/?action=playctl"
+ volume="$({ncat "$RHOST" "$RPORT" <<-EOF
+ GET /?action=playctl&api=volume HTTP/1.0${CR}
+ Host: ${RHOST}${CR}
+ ${CR}
+ EOF
+ } | sed -r '1,/^\r$/d')"
+ volume=$(validate "${volume}" '[1-9]?[0-9]|100' 20)
+else
+ actionuri='?action=playctl'
+ volume=$(validate "$(cat "$_DATA/mplayer.volume")" '[1-9]?[0-9]|100' 20)
+fi
+
+pa_sinks(){
+ if which pactl >/dev/null; then
+ export DISPLAY=":0"
+ export XDG_RUNTIME_DIR="/run/user/$(id |sed -rn '1s;.*uid=([0-9]+)[^0-9].*;\1;p')"
+
+ pactl list sinks \
+ | sed -rn '/Sink #/{:X;N;/Description: /!bX;s;Sink #([0-9]+).+Description: (.*);\1 \2;p}'
+ fi
+}