1
0
mirror of https://github.com/videojs/video.js.git synced 2025-03-19 21:28:23 +02:00

fix: IS_IPAD should be false on iPhone (#6371)

Safari user agent. However, the new check also returns true for iPhones.
Therefore, we should exclude iPhones from the check.
This commit is contained in:
Gary Katsevman 2019-12-24 11:23:42 -05:00 committed by GitHub
parent 274299b45f
commit 917d898a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,7 +181,8 @@ export const TOUCH_ENABLED = Dom.isReal() && (
* @const * @const
* @type {Boolean} * @type {Boolean}
*/ */
export const IS_IPAD = (/iPad/i).test(USER_AGENT) || (IS_SAFARI && TOUCH_ENABLED); export const IS_IPAD = (/iPad/i).test(USER_AGENT) ||
(IS_SAFARI && TOUCH_ENABLED && !(/iPhone/i).test(USER_AGENT));
/** /**
* Whether or not this device is an iPhone. * Whether or not this device is an iPhone.