Media element listeners wrapped in a function for vgAudio and vgVideo.