koel/resources/assets/js/utils/supports.ts
2022-12-23 22:44:34 +07:00

12 lines
457 B
TypeScript

/**
* Check if AudioContext is supported by the current browser.
*/
export const isAudioContextSupported = process.env.NODE_ENV !== 'test'
/**
* Checks if the browser supports reading (and thus uploading) a whole directory.
*/
export const isDirectoryReadingSupported = window.DataTransferItem &&
typeof window.DataTransferItem.prototype.webkitGetAsEntry === 'function'
export const isFullscreenSupported = () => Boolean(document.fullscreenEnabled)