fix: Oculus browser is no longer marked as TV

This commit is contained in:
Emil Rowland 2021-12-19 09:54:39 +01:00
parent e7c715a394
commit 932772e375

View file

@ -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;
}