There's also a chrome extension "Media Keys by Sway.fm"[1].
It can scrobble to last.fm and pause videos/music in other tabs when you start playing something else.
[1] https://chrome.google.com/webstore/detail/media-keys-by-sway...
[1] https://chrome.google.com/webstore/detail/media-keys-by-sway...