remotion
Version:
Make videos programmatically
12 lines (11 loc) • 462 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.truncateSrcForLabel = truncateSrcForLabel;
// Data URLs like the ones from canvas.toDataURL() can be many megabytes, which makes the delayRender() label
// unreadable and bloats log output
function truncateSrcForLabel(src) {
if (src.startsWith('data:') && src.length > 100) {
return src.slice(0, 60) + '...[' + src.length + ' chars total]';
}
return src;
}