code: function onCanPlayStart() {
  		media.removeEventListener('canplaythrough', onCanPlayStart);
  
  		// dispatch new "canplaystart" event
  		dispatchCustomEvent(media, 'canplaystart');
  
  		if (!paused || media.autoplay) {
  			media.play();
  		}
  	}
docs: when the media can play