UNPKG

@genexus/web-standard-functions

Version:

GeneXus JavaScript standard functions library for web generators

19 lines 647 B
export const recordVideo = async () => { return new Promise((resolve, reject) => { const newInput = document.createElement("input"); newInput.type = "file"; newInput.accept = "video/*"; newInput.capture = "camcorder"; newInput.multiple = false; newInput.hidden = true; document.body.appendChild(newInput); newInput.onchange = async (eventInfo) => { document.body.removeChild(newInput); resolve(newInput.files[0]); }; requestAnimationFrame(() => { newInput.click(); }); }); }; //# sourceMappingURL=recordVideo.js.map