[PLUG] flash plugin and sound
Daniel Hedlund
daniel at digitree.org
Wed Aug 16 02:24:17 UTC 2006
I have a simple script that I use to enable and disable the flash plugin
for Firefox that I normally keep as "~/bin/flash". Unfortunately the
script isn't perfect and there are a few things I'd like to improve upon:
- if you have sound playing when the flash plugin is first used on a web
page, you no longer have any sound support in flash until after you've
completely restarted Firefox.
- when you disable the plugin, you have to restart Firefox for the
changes to take effect. Enabling flash while the web browser is open is
okay and changes take effect immediately.
What I'd like to do is to find some way to unload or replace the flash
plugin with an empty/shell plugin to cause it unload without restarting
Firefox. This is becoming a huge pain for me in that I am almost always
listening to music using rhythmbox or mplayer while browsing the web.
Fairly often I like to listen to streaming music (radio, GarageBand.com,
CDBaby.com, etc) and would simply like to stop rhythmbox and hit 'play'
within the flash plugin. I have even reverted to such tactics as
loading Firefox as another user using sudo so I don't have to restart my
Firefox client with 20+ pages open. I think the problem is mostly
because flash doesn't use alsa and thus doesn't allow mixing?
Any ideas, solutions or success stories? For anyone interested in
enabling/disabling the flash plugin, my script is as follows:
#!/bin/bash
display_usage() {
echo "USAGE: $0 [ --enable | --disable ]"
echo
}
if [ ! $# -eq 1 ]; then
display_usage && exit 1
fi
if [ $1 = "--enable" ]; then
echo "enabling flash..."
chmod 644 ~/.mozilla/plugins/flashplayer.xpt
chmod 755 ~/.mozilla/plugins/libflashplayer.so
elif [ $1 = "--disable" ]; then
echo "disabling flash..."
chmod 000 ~/.mozilla/plugins/{flashplayer.xpt,libflashplayer.so}
elif [ $1 = "--help" ]; then
display_usage && exit 0
else
display_usage && exit 1
fi
Cheers,
Daniel Hedlund
daniel at digitree.org
More information about the PLUG
mailing list