javascript - 检测 iPad 上的特定浏览器

发布于 2024-12-28 19:24:06 字数 329 浏览 3 评论 0原文

我正在寻找一种方法来检测用户是否正在使用 iPad 上的 Opera Mini。我之所以要这样做,是因为 iPad 上的 Opera Mini 不支持 HTML5 的“视频”标签或 Flash。在这种特定情况下,我需要能够在我的视频容器中加载静态图像。

有什么方法可以检测到这个吗?

我已经在使用 ipad 检测,例如:

 var isiPad = navigator.userAgent.match(/iPad/i) != null;
 if (isiPad){ ... }

现在,我可以获得该特定浏览器吗?

Im looking for a way to detect if the user is using Opera Mini on iPad. The reason why I want to do that is because Opera Mini on iPad does not support HTML5's "video" tag or Flash. I need to be able to have a static image loading in my video container in that specific case.

Is there any way of detecting this??

Im already using the ipad detection like:

 var isiPad = navigator.userAgent.match(/iPad/i) != null;
 if (isiPad){ ... }

Now, can I get that specific browser?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

故事↓在人 2025-01-04 19:24:06

您可以使用 Modernizr

You could check for <video> support directly using Modernizr.

无法言说的痛 2025-01-04 19:24:06

我想这会回答你的问题。

我希望这有帮助。

I think this will answer your question.
https://www.handsetdetection.com/features/mobile-browser-detection

I hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文