blob: 6cee48d2e984fe3332b59458c0409f9a3155a15f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
# Play flash videos in mplayer
# https://bbs.archlinux.org/viewtopic.php?pid=901228#p901228
# The original: works only when there is only one plugin-container process
# mplayer $(d=/proc/$(pidof plugin-container)/fd; ls --color=no -l $d | gawk '/\/tmp\/Flash/ {print "'$d'/" $9}' )
videos=
for pid in $(pidof plugin-container)
do
d=/proc/$pid/fd
videos="$videos $(ls --color=no -l $d | gawk '/\/tmp\/Flash/ {print "'$d'/" $9}')"
done
if [ "$videos" ]
then
mplayer $videos
else
echo 'No Flash is loaded'
exit 1
fi
|