use nativeControls for ios devices

This commit is contained in:
Sean Yesmunt 2020-05-25 10:36:17 -04:00
parent 8183b5822b
commit 74dc6f4469

View file

@ -39,18 +39,19 @@ type VideoJSOptions = {
poster?: string,
};
const IS_IOS =
(/iPad|iPhone|iPod/.test(navigator.platform) ||
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&
!window.MSStream;
const VIDEO_JS_OPTIONS: VideoJSOptions = {
preload: 'auto',
playbackRates: [0.25, 0.5, 0.75, 1, 1.1, 1.25, 1.5, 1.75, 2],
responsive: true,
controls: true,
html5: { nativeControlsForTouch: IS_IOS },
};
const IS_IOS =
(/iPad|iPhone|iPod/.test(navigator.platform) ||
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&
!window.MSStream;
const F11_KEYCODE = 122;
const SPACE_BAR_KEYCODE = 32;
const SMALL_F_KEYCODE = 70;