mirror of
https://github.com/videojs/video.js.git
synced 2025-04-07 07:19:54 +02:00
@misteroneill fixed iphone useragent detection. closes #3077
This commit is contained in:
parent
5245335147
commit
341c9c7700
@ -9,6 +9,7 @@ CHANGELOG
|
||||
* @mister-ben updated Umuted to Unmute in lang files ([view](https://github.com/videojs/video.js/pull/3053))
|
||||
* @hartman updated fullscreen and time controls for more consistent widths ([view](https://github.com/videojs/video.js/pull/2893))
|
||||
* @hartman Set a min-width for the progress slider of 4em ([view](https://github.com/videojs/video.js/pull/2902))
|
||||
* @misteroneill fixed iphone useragent detection ([view](https://github.com/videojs/video.js/pull/3077))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -15,8 +15,12 @@ const appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop())
|
||||
* @constant
|
||||
* @private
|
||||
*/
|
||||
export const IS_IPHONE = (/iPhone/i).test(USER_AGENT);
|
||||
export const IS_IPAD = (/iPad/i).test(USER_AGENT);
|
||||
|
||||
// The Facebook app's UIWebView identifies as both an iPhone and iPad, so
|
||||
// to identify iPhones, we need to exclude iPads.
|
||||
// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/
|
||||
export const IS_IPHONE = (/iPhone/i).test(USER_AGENT) && !IS_IPAD;
|
||||
export const IS_IPOD = (/iPod/i).test(USER_AGENT);
|
||||
export const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user