sampotts / plyr

A simple HTML5, YouTube and Vimeo player
https://plyr.io
MIT License
26.04k stars 2.9k forks source link

iOS/iPhone 15.2.1 reports navigator.platform as MacIntel #2406

Open mannyveloso opened 2 years ago

mannyveloso commented 2 years ago

Expected behaviour

plyr correctly determines if it's running on iPhone/iOS 15.2.1

Actual behaviour

plyr doesn't realize it's using the iPhone/iOS

Steps to reproduce

call browser.isIPhone on an iPhone running iOS 15.2.1

Environment

Console errors (if any)

Link to where the bug is happening

browser.js

navigator Navigator
mannyveloso commented 2 years ago

As a note, hls.js detects an iPhone because it's missing the MediaSource extensions. iPad/iOS and MacOS both support MediaSource, making it a convenient way of determining the platform.

erikt9 commented 2 years ago

Just noting that the iPhone only identifies itself as MacOS if the user has requested the desktop version of the website and browser.isIos still works in this mode (although it can't differentiate from iPads).