use nativeControls for ios devices
This commit is contained in:
parent
8183b5822b
commit
74dc6f4469
1 changed files with 6 additions and 5 deletions
|
@ -39,18 +39,19 @@ type VideoJSOptions = {
|
||||||
poster?: string,
|
poster?: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const IS_IOS =
|
||||||
|
(/iPad|iPhone|iPod/.test(navigator.platform) ||
|
||||||
|
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&
|
||||||
|
!window.MSStream;
|
||||||
|
|
||||||
const VIDEO_JS_OPTIONS: VideoJSOptions = {
|
const VIDEO_JS_OPTIONS: VideoJSOptions = {
|
||||||
preload: 'auto',
|
preload: 'auto',
|
||||||
playbackRates: [0.25, 0.5, 0.75, 1, 1.1, 1.25, 1.5, 1.75, 2],
|
playbackRates: [0.25, 0.5, 0.75, 1, 1.1, 1.25, 1.5, 1.75, 2],
|
||||||
responsive: true,
|
responsive: true,
|
||||||
controls: 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 F11_KEYCODE = 122;
|
||||||
const SPACE_BAR_KEYCODE = 32;
|
const SPACE_BAR_KEYCODE = 32;
|
||||||
const SMALL_F_KEYCODE = 70;
|
const SMALL_F_KEYCODE = 70;
|
||||||
|
|
Loading…
Add table
Reference in a new issue