mirror of
https://github.com/videojs/video.js.git
synced 2025-02-04 11:43:27 +02:00
fix: cast TOUCH_ENABLED to boolean (#6943)
This needs to be cast before exporting so users can confidently pass it into their videojs config and not worry about videojs internals doing strict equality checks against true/false. Co-authored-by: Kevin Kipp <kkipp@cloudflare.com>
This commit is contained in:
parent
3901ab0e72
commit
dcce0e908d
@ -169,10 +169,10 @@ export const IS_WINDOWS = (/Windows/i).test(USER_AGENT);
|
||||
* @const
|
||||
* @type {Boolean}
|
||||
*/
|
||||
export const TOUCH_ENABLED = Dom.isReal() && (
|
||||
export const TOUCH_ENABLED = Boolean(Dom.isReal() && (
|
||||
'ontouchstart' in window ||
|
||||
window.navigator.maxTouchPoints ||
|
||||
window.DocumentTouch && window.document instanceof window.DocumentTouch);
|
||||
window.DocumentTouch && window.document instanceof window.DocumentTouch));
|
||||
|
||||
/**
|
||||
* Whether or not this device is an iPad.
|
||||
|
Loading…
x
Reference in New Issue
Block a user