src/index.js
function onPlayChange() {
		if (paused !== media.paused) {
			paused = media.paused;

			$(self.play, { 'aria-label': paused ? lang.play || 'play' : lang.pause || 'pause' });
			$(self.playSymbol, { 'aria-hidden': !paused });
			$(self.pauseSymbol, { 'aria-hidden': paused });

			clearInterval(interval);

			if (!paused) {
				// listen for time changes every 30th of a second
				interval = setInterval(onTimeChange, 34);
			}

			// dispatch new "playchange" event
			dispatchCustomEvent(media, 'playchange');
		}
	}
function onPlayChange() {
		if (paused !== media.paused) {
			paused = media.paused;

			$(self.play, { 'aria-label': paused ? lang.play || 'play' : lang.pause || 'pause' });
			$(self.playSymbol, { 'aria-hidden': !paused });
			$(self.pauseSymbol, { 'aria-hidden': paused });

			clearInterval(interval);

			if (!paused) {
				// listen for time changes every 30th of a second
				interval = setInterval(onTimeChange, 34);
			}

			// dispatch new "playchange" event
			dispatchCustomEvent(media, 'playchange');
		}
	}
function onPlayChange ( ) { if ( paused !== media . paused ) { paused = media . paused ; $ ( self . play , { 'aria-label' : paused ? lang . play || 'play' : lang . pause || 'pause' } ) ; $ ( self . playSymbol , { 'aria-hidden' : ! paused } ) ; $ ( self . pauseSymbol , { 'aria-hidden' : paused } ) ; clearInterval ( interval ) ; if ( ! paused ) { // listen for time changes every 30th of a second interval = setInterval ( onTimeChange , 34 ) ; } // dispatch new "playchange" event dispatchCustomEvent ( media , 'playchange' ) ; } }
when the play state changes
when the play state changes