slitaz-tools rev 985
tazbox video: add --fullscreen
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 27 09:30:50 2016 +0200 (2016-05-27) |
parents | ca6dd5992cda |
children | 0b155bca1ebf |
files | applications/tazbox-video-fullscreen.desktop tazbox/tazbox |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/applications/tazbox-video-fullscreen.desktop Fri May 27 09:30:50 2016 +0200 1.3 @@ -0,0 +1,9 @@ 1.4 +[Desktop Entry] 1.5 +Type=Application 1.6 +Name=Video player (fullscreen) 1.7 +Name[fr]=Lecteur video (plein écran) 1.8 +Comment=Versatile HTML5 video player 1.9 +Comment[fr]=Lecteur video HTML5 versatile 1.10 +Exec=tazbox video --fullscreen 1.11 +Icon=video-x-generic 1.12 +Categories=AudioVideo;Video;Player;
2.1 --- a/tazbox/tazbox Thu May 26 15:14:00 2016 +0200 2.2 +++ b/tazbox/tazbox Fri May 27 09:30:50 2016 +0200 2.3 @@ -621,6 +621,17 @@ 2.4 video() { 2.5 icon='video-x-generic' 2.6 2.7 + # Get switchs 2.8 + tazwebargs="--notoolbar" 2.9 + while true ; do 2.10 + case "$1" in 2.11 + --fullscreen) tazwebargs="$tazwebargs --kiosk" ;; 2.12 + --loop) loop="loop" ;; 2.13 + *) break 2.14 + esac 2.15 + shift 2.16 + done 2.17 + 2.18 # Get filename 2.19 [ "$1" ] && file="$PWD/$(basename "$1")" 2.20 [ -s "$file" ] || file="$(yad --file --width='500' --height='400' \ 2.21 @@ -646,16 +657,21 @@ 2.22 <html> 2.23 <head> 2.24 <title>$(basename "$file")</title> 2.25 + <style text/css> 2.26 +html { 2.27 + backgound-color: black; 2.28 +} 2.29 + </style> 2.30 </head> 2.31 <body> 2.32 -<video width="100%" src="file://$file" controls $attr>$text 2.33 +<video width="100%" src="file://$file" controls $attr$loop>$text 2.34 Unsupported video file format 2.35 </video> 2.36 </body> 2.37 </html> 2.38 EOT 2.39 2.40 - tazweb --notoolbar file://$tmp || browser file://$tmp 2.41 + tazweb $tazwebargs file://$tmp || browser file://$tmp 2.42 rm -f $tmp 2.43 } 2.44 2.45 @@ -864,7 +880,8 @@ 2.46 ;; 2.47 2.48 video) 2.49 - video "$2" 2.50 + shift 2.51 + video "$@" 2.52 ;; 2.53 2.54 newvt)