Skip to content
Snippets Groups Projects
Commit 57b19f85 authored by jojohoch's avatar jojohoch
Browse files

[player] Remove mobile os check from device service

Windows convertibles were not recognized as mobile devices by this check
parent 276d9868
No related branches found
No related tags found
No related merge requests found
Pipeline #53393 passed
......@@ -6,14 +6,12 @@ import { Injectable } from '@angular/core';
export class DeviceService {
hasHardwareKeyboard: boolean = false;
private readonly isTouch!: boolean;
private readonly isMobile!: boolean;
constructor() {
this.isTouch = ('ontouchstart' in window) || (navigator && navigator.maxTouchPoints > 0);
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
this.isTouch = ('ontouchstart' in window) || (navigator && navigator.maxTouchPoints > 1);
}
get isMobileWithoutHardwareKeyboard(): boolean {
return this.isMobile && this.isTouch && !this.hasHardwareKeyboard;
return this.isTouch && !this.hasHardwareKeyboard;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment