koel/resources/assets/js/utils/supports.ts

13 lines
457 B
TypeScript
Raw Normal View History

2022-04-15 14:24:30 +00:00
/**
* Check if AudioContext is supported by the current browser.
*/
2022-07-19 08:19:57 +00:00
export const isAudioContextSupported = process.env.NODE_ENV !== 'test'
2022-04-15 14:24:30 +00:00
/**
* Checks if the browser supports reading (and thus uploading) a whole directory.
*/
2022-05-14 15:13:29 +00:00
export const isDirectoryReadingSupported = window.DataTransferItem &&
2022-04-15 14:24:30 +00:00
typeof window.DataTransferItem.prototype.webkitGetAsEntry === 'function'
2022-12-23 15:44:34 +00:00
export const isFullscreenSupported = () => Boolean(document.fullscreenEnabled)