- 提供video和canvas两个html标签
<canvas id="charVideoCanvas"></canvas> <input type="file" id="file" accept="video/*">
- 引入charVideo.js
- 新建对象,config参数为空将使用默认配置,可覆盖:
默认配置:
new CharVideo(config);
const defaultConfig = { space: 10, // 空间 fileInputId: 'file', // 文件选择框id canvasId: 'charVideoCanvas', // 字符画画布 }
root-wang / charvideo Goto Github PK
View Code? Open in Web Editor NEWHome Page: char-video-rosy.vercel.app