summaryrefslogtreecommitdiffstats
path: root/flplay
blob: 5cb4594cf43347d30cd455af4c3ee11b4fcf2344 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/zsh
fpid=$(pidof plugin-container)

fd=$(lsof | grep $fpid | /bin/grep '(deleted)' | /bin/grep FlashX |  /bin/grep -o '[0-9]*u ' | head -1)


if [[ -z $fd ]];then
    fpid=$(pidof firefox-bin)
    fd=$(lsof | grep $fpid | /bin/grep "media_cache" |  /bin/grep -o '[0-9]*u ' | head -1)
fi

fd=$fd[1,-3]

print /proc/$fpid/fd/$fd

[[ -n $1 ]] && exit

mplayer /proc/$fpid/fd/$fd