You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
383 B
21 lines
383 B
let mediaQueryDetectorElem;
|
|
|
|
export function initialize()
|
|
{
|
|
// Media query detector stuff.
|
|
mediaQueryDetectorElem =
|
|
document.getElementById('mediasoup-demo-app-media-query-detector');
|
|
|
|
return Promise.resolve();
|
|
}
|
|
|
|
export function isDesktop()
|
|
{
|
|
return Boolean(mediaQueryDetectorElem.offsetParent);
|
|
}
|
|
|
|
export function isMobile()
|
|
{
|
|
return !mediaQueryDetectorElem.offsetParent;
|
|
}
|