This question was asked before, but the answers are not exactly what I need.
I need to distinguish in Microsoft Edge if it's a tablet or not (Desktop).
1) The following thread: Can you detect "Tablet Mode" in Edge and IE11 using JavaScript on Windows 10?
worked indeed, but I'm afraid that in the next version Microsoft will change the behavior.
How can I be sure that they won't?
Answers with if condition of window.PointerEvent do not work at all, since it's defined in Desktop.
I can't use CSS Media Queries Interaction media features as suggested here: Is there any way to detect if user has launched microsoft edge tablet or desktop browser?
Here are the hardware specific differences in the Edge browser capabilities:
To detect RTC capabilities, use the following code:
Embedding a Flash movie which uses an ExternalInterface call would be the easiest way to detect Flash.
The properties of the
navigatorobject should be able to distinguish tablet from phone. For example:should return
x86for Surface devices, butotherfor phones.Also, the user agent changes when casting a phone display to a TV. It goes from:
Microsoft Edge UA (Mobile)
to:
Microsoft Edge UA (Continuum)
compared to the desktop:
Microsoft Edge UA (Desktop)
References
Microsoft Edge and Continuum: Your desktop browser on Mobile
Microsoft Edge Dev Guide: Object RTC API
ORTC Specification: dictionary RTCRtpCapabilities
Flash Player guidance for Internet Explorer 11 and Microsoft Edge
Minimum Hardware Requirements: Windows 10
Continuum for Phones FAQ
clientInformation object
Device Fingerprint Help
Security Error when trying to call ActionScript function from JS
The Windows 10 Browser Conundrum
how to tell if android user came from home screen app
Configuring Web Applications