From 932772e375ebaa02e3f62d1736604ea208b2c863 Mon Sep 17 00:00:00 2001 From: Emil Rowland Date: Sun, 19 Dec 2021 09:54:39 +0100 Subject: [PATCH] fix: Oculus browser is no longer marked as TV --- src/scripts/browser.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scripts/browser.js b/src/scripts/browser.js index af0a72ffe4..b340a403f3 100644 --- a/src/scripts/browser.js +++ b/src/scripts/browser.js @@ -2,6 +2,11 @@ function isTv() { // This is going to be really difficult to get right const userAgent = navigator.userAgent.toLowerCase(); + // The OculusBrowsers userAgent also has the samsungbrowser defined but is not a tv. + if (userAgent.indexOf('oculusbrowser') !== -1) { + return false; + } + if (userAgent.indexOf('tv') !== -1) { return true; }