1
0
mirror of https://github.com/videojs/video.js.git synced 2025-03-17 21:18:27 +02:00

fix: detect chromium-based Edge (#6497)

This loosens the regex used for Edge. Still detects legacy Edge but now
also detects the new Edge.

IS_CHROME still returns true for Edgium but I think that it's worth
keeping that as the behavior should be pretty close. If there is a need
to differentiate, can check IS_EDGE and also whether IS_EDGE &&
IS_CHROME is present. Combining with IS_WINDOWS could also be useful as
some capabilities of Edge are only available in Windows.
This commit is contained in:
Gary Katsevman 2020-02-26 11:43:04 -05:00 committed by GitHub
parent 31ac9d7a58
commit 749ef548ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ export const IS_FIREFOX = (/Firefox/i).test(USER_AGENT);
* @const
* @type {Boolean}
*/
export const IS_EDGE = (/Edge/i).test(USER_AGENT);
export const IS_EDGE = (/Edg/i).test(USER_AGENT);
/**
* Whether or not this is Google Chrome.