UNPKG

@genexus/web-standard-functions

Version:

GeneXus JavaScript standard functions library for web generators

23 lines 782 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.recordVideo = void 0; 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(); }); }); }; exports.recordVideo = recordVideo; //# sourceMappingURL=recordVideo.js.map