Skip to content

Commit

Permalink
fix: browser util flagging smart TV as Safari (videojs#8566)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 authored Jan 26, 2024
1 parent edb6daf commit 14b5fde
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/js/utils/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,22 @@ export let IS_IPAD = false;
// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/
export let IS_IPHONE = false;

/**
* Whether or not this is a Tizen device.
*
* @static
* @type {Boolean}
*/
export let IS_TIZEN = false;

/**
* Whether or not this is a WebOS device.
*
* @static
* @type {Boolean}
*/
export let IS_WEBOS = false;

/**
* Whether or not this device is touch-enabled.
*
Expand Down Expand Up @@ -235,7 +251,11 @@ if (!IS_CHROMIUM) {
return version;
}());

IS_SAFARI = (/Safari/i).test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE;
IS_TIZEN = (/Tizen/i).test(USER_AGENT);

IS_WEBOS = (/Web0S/i).test(USER_AGENT);

IS_SAFARI = (/Safari/i).test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE && !IS_TIZEN && !IS_WEBOS;

IS_WINDOWS = (/Windows/i).test(USER_AGENT);

Expand Down

0 comments on commit 14b5fde

Please sign in to comment.