src/index.js
function onVolumeKeydown(event) {
		const { keyCode, shiftKey } = event;

		// 37: LEFT, 38: UP, 39: RIGHT, 40: DOWN
		if (37 <= keyCode && 40 >= keyCode) {
			event.preventDefault();

			const isLTR = /^(btt|ltr)$/.test(volumeDir);
			const offset = 37 === keyCode || 39 === keyCode ? keyCode - 38 : isLTR ? 39 - keyCode : keyCode - 39;

			media.volume = Math.max(0, Math.min(1, media.volume + offset * (isLTR ? 0.1 : -0.1) * (shiftKey ? 1 : 0.2)));
		}
	}
function onVolumeKeydown(event) {
		const { keyCode, shiftKey } = event;

		// 37: LEFT, 38: UP, 39: RIGHT, 40: DOWN
		if (37 <= keyCode && 40 >= keyCode) {
			event.preventDefault();

			const isLTR = /^(btt|ltr)$/.test(volumeDir);
			const offset = 37 === keyCode || 39 === keyCode ? keyCode - 38 : isLTR ? 39 - keyCode : keyCode - 39;

			media.volume = Math.max(0, Math.min(1, media.volume + offset * (isLTR ? 0.1 : -0.1) * (shiftKey ? 1 : 0.2)));
		}
	}
function onVolumeKeydown ( event ) { const { keyCode , shiftKey } = event ; // 37: LEFT, 38: UP, 39: RIGHT, 40: DOWN if ( 37 <= keyCode && 40 >= keyCode ) { event . preventDefault ( ) ; const isLTR = / ^(btt|ltr)$ / . test ( volumeDir ) ; const offset = 37 === keyCode || 39 === keyCode ? keyCode - 38 : isLTR ? 39 - keyCode : keyCode - 39 ; media . volume = Math . max ( 0 , Math . min ( 1 , media . volume + offset * ( isLTR ? 0.1 : - 0.1 ) * ( shiftKey ? 1 : 0.2 ) ) ) ; } }
keydown from mute control or volume control
keydown from mute control or volume control