15 lines
396 B
JavaScript
15 lines
396 B
JavaScript
'use strict';
|
|
|
|
"use strict";
|
|
const inWorker = "WorkerGlobalScope" in globalThis && globalThis instanceof globalThis.WorkerGlobalScope;
|
|
function testVideoFormat(mimeType) {
|
|
if (inWorker) {
|
|
return false;
|
|
}
|
|
const video = document.createElement("video");
|
|
return video.canPlayType(mimeType) !== "";
|
|
}
|
|
|
|
exports.testVideoFormat = testVideoFormat;
|
|
//# sourceMappingURL=testVideoFormat.js.map
|