Playback will be interrupted. Proceed?Ideally, this warning would show up not only when you click on a link, but also if you try to close the tab, or if you type in a new url (this may be less possible than the other two instances; I'm not sure).
Continue anyway » Open link in a new window »
[ ] Always take this action
(You can change this in your account settings at any time.)
Advertise here: Contact FM.
window.onbeforeunload = function() {
player = document.getElementById(...);
if (player.getConfig().state == "PLAYING") {
msg = "Music is playing. Are you sure?";
if (window.event)
window.event.returnValue = msg; // IE
else
return msg; // Firefox
}
}onbeforeunload.googleapis.com if you want to use the favorites feature.
I'm pretty sure this would be wrapped up in some sort of javascript API to the flash player. We're using a pretty general free mp3 flash player and I'm not sure it has that kind of functionality.
It happens to me all the time as well, not just on MeFi Music, but youtube, vimeo, and countless blogs with audio and video players and sometimes I wish I could be warned before losing my spot in their player.
posted by mathowie at 11:09 AM on March 20