Add barcode-detector-api-polyfill dependency and update environment variable declarations in SvelteKit project
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.canEnumerateDevices = exports.hasNavigator = void 0;
|
||||
/**
|
||||
* If navigator is present.
|
||||
*/
|
||||
function hasNavigator() {
|
||||
return typeof navigator !== 'undefined';
|
||||
}
|
||||
exports.hasNavigator = hasNavigator;
|
||||
/**
|
||||
* If mediaDevices under navigator is supported.
|
||||
*/
|
||||
function isMediaDevicesSupported() {
|
||||
return hasNavigator() && !!navigator.mediaDevices;
|
||||
}
|
||||
/**
|
||||
* If enumerateDevices under navigator is supported.
|
||||
*/
|
||||
function canEnumerateDevices() {
|
||||
return !!(isMediaDevicesSupported() && navigator.mediaDevices.enumerateDevices);
|
||||
}
|
||||
exports.canEnumerateDevices = canEnumerateDevices;
|
||||
//# sourceMappingURL=navigator-utils.js.map
|
||||
Reference in New Issue
Block a user