mirror of
https://github.com/videojs/video.js.git
synced 2025-01-02 06:32:07 +02:00
bugfix: fix window.navigator.userAgentData may be '{}' (#8474)
This commit is contained in:
parent
f7b1e3d03d
commit
d535e163da
@ -154,7 +154,7 @@ export const TOUCH_ENABLED = Boolean(Dom.isReal() && (
|
||||
|
||||
const UAD = window.navigator && window.navigator.userAgentData;
|
||||
|
||||
if (UAD) {
|
||||
if (UAD && UAD.platform && UAD.brands) {
|
||||
// If userAgentData is present, use it instead of userAgent to avoid warnings
|
||||
// Currently only implemented on Chromium
|
||||
// userAgentData does not expose Android version, so ANDROID_VERSION remains `null`
|
||||
|
Loading…
Reference in New Issue
Block a user