@dvrd/dvr-controls 0.0.30 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/js/util/miscUtil.ts
CHANGED
|
@@ -156,14 +156,11 @@ export const copyClipboard = (text: string): Promise<void> => {
|
|
|
156
156
|
return window.navigator.clipboard.writeText(text);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
export
|
|
160
|
-
const webpSupported = webpIsSupported(), extension = webpSupported ? 'webp' : fallbackExtension;
|
|
159
|
+
export function webpSupported(): boolean {
|
|
161
160
|
try {
|
|
162
|
-
return
|
|
161
|
+
return document.createElement('canvas').toDataURL('image/webp')
|
|
162
|
+
.indexOf('data:image/webp') === 0;
|
|
163
163
|
} catch {
|
|
164
|
-
return
|
|
164
|
+
return false;
|
|
165
165
|
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
const webpIsSupported = (): boolean => document.createElement('canvas').toDataURL('image/webp')
|
|
169
|
-
.indexOf('data:image/webp') === 0;
|
|
166
|
+
}
|