Open danielraffel opened 11 months ago
navigator.platform no longer has anything useful. and .. there's no longer anything in navigator
that communicates its an ipad.
i think best we can do is userAgent.includes('Intel Mac OS X')
... this'll catch desktop safari too.. but.. Apple seems fairly intent on making those two indistinguishable. So.. oh well.
EDIT(paulirish): daniel left this amazing comment on an ios branch commit.. here's that comment:
The change introduces a condition to mute videos when they are played on an iPad or iPhone. Specifically, it adds the parameter
'mute', '1'
to the video URL if the platform is identified as iPad or iPhone. This is achieved using the test/iPad|iPhone|iPod/.test(navigator.platform)
.The purpose is to mute videos automatically on these devices upon tapping based on the findings I mentioned here: https://github.com/paulirish/lite-youtube-embed/commit/9dfd33a975b97410769981579aa7301118c1cac9#commitcomment-130244618