Add event handlers for HTMLMediaElement