Fixed sample code.

HTMLMediaElement#mediaKeys is right I think.