Creating a keyboard shortcut to pause Youtube video in a Google Chrome tab
You could assign a shortcut to a script like this:

tell application "Google Chrome"
    repeat with t in tabs of windows
        tell t
            if URL starts with "http://www.youtube.com" then
                execute javascript "player = document.querySelectorAll('#watch7-player embed')[0]
if (player) {
    player.getPlayerState() == 1 ? player.pauseVideo() : player.playVideo()
} else { // if youtube.com/html5 is enabled
    document.querySelectorAll('.html5-player-chrome &gt; button:first-child')[0].click()
}"
                exit repeat
            end if
        end tell
    end repeat
end tell


For Safari, replace execute javascript with do JavaScript.