]> git.plutz.net Git - serve0/blobdiff - actions/watch.sh
switch to mplayer2 again
[serve0] / actions / watch.sh
index e473ac4755d1479bb537272e2972090546effc8a..7db9c645db6b1ea6aaf5fd57898effc7e53f36d5 100755 (executable)
@@ -75,18 +75,19 @@ case "${_COOKIE[watch]}" in
     export DISPLAY=":0"
     uid="$(id |sed -rn '1s;.*uid=([0-9]+)[^0-9].*;\1;p')"
     export XDG_RUNTIME_DIR="/run/user/$uid"  # required for Pulseaudio
+    xrandr >/dev/null  # helps enable all screens
 
-    nohup /usr/bin/mplayer -ao pulse \
-      -slave -input file="$fifofile" \
-      -volume "$volume" \
-      "$playuri" >"$statusfile" 2>/dev/null &
-
-    # # MPlayer2:
     # nohup /usr/bin/mplayer -ao pulse \
-    #   --slave --input=file="$fifofile" \
-    #   --volume="$volume" \
+    #   -slave -input file="$fifofile" \
+    #   -volume "$volume" \
     #   "$playuri" >"$statusfile" 2>/dev/null &
 
+    # MPlayer2: (statusline on stderr)
+    nohup /usr/bin/mplayer -ao pulse \
+      --slave --input=file="$fifofile" \
+      --volume="$volume" \
+      "$playuri" 2>"$statusfile" >/dev/null &
+
     chmod 600 "$statusfile"
 
     redirect "?p=playctl&${watch_link}"