mirror of
https://github.com/koel/koel
synced 2024-12-26 20:43:05 +00:00
7 lines
396 B
TypeScript
7 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))
|
||
|
}
|
||
|
}
|