mirror of
https://github.com/koel/koel
synced 2024-12-26 12:33:06 +00:00
6 lines
396 B
TypeScript
6 lines
396 B
TypeScript
export class DeviceChecker {
|
|
isRetina () {
|
|
const m = window.matchMedia('only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)')
|
|
return (m && m.matches || (window.devicePixelRatio > 1))
|
|
}
|
|
}
|