decord/source/14728_getYoutubeMeta.js
2026-08-08 06:10:11 +00:00

35 lines
1 KiB
JavaScript

// Module ID: 14728
// Function ID: 14729
// Name: getYoutubeMeta
// Dependencies: [7990, 14729]
// Exports: getYoutubeMeta
// Module 14728 (getYoutubeMeta)
import module_7990 from "module_7990";
import _regeneratorRuntime from "_regeneratorRuntime";
export const getYoutubeMeta = function getYoutubeMeta(arg0) {
const _regeneratorRuntime = arg0;
return _regeneratorRuntime.default.async(function getYoutubeMeta$(next) {
next = next.next;
next.prev = next;
while (0 !== next) {
if (2 === next) {
let sent = next.sent;
next.next = 5;
let tmp = mod;
let _default = mod.default;
let tmp2 = sent;
return _default.awrap(sent.json());
} else if (5 === next) {
let str = "return";
return next.abrupt("return", next.sent);
} else {
return next.stop();
}
}
next.next = 2;
return mod.default.awrap(fetch("https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=" + mod + "&format=json"));
}, null, null, null, Promise);
};