2.0.3 • Published 4 months ago

utils-cyj v2.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

通用的封装后的js库

使用方法

1.npm|pnpm安装

npm i utils-cyj 或者 pnpm i utils-cyj

2.引入

import UtilsCyj from "utils-cyj";

3.视频切片使用示例

import UtilsCyj from "utils-cyj";
const cf = document.getElementById("chooseFile");
const img = (document.getElementById("show")) as HTMLImageElement;
cf?.addEventListener("change",(res)=>{
    const input:any = res.target
    const videoToImg = UtilsCyj.VideoToImg({
        width:100,
        file:input.files[0],
        success:()=>{
            //获取某个时间点的切片
            // videoToImg.setCurrentTime(0,1)
            //快速切片
            // videoToImg.fastStart(200);
            //自动切片
            videoToImg.start();
        },
        backImgFn:(res)=>{ //切片返回的地方
            img.src = res;
        },
        finish:()=>{
            console.log("完成")
        }
    })
})
2.0.3

4 months ago

2.0.2

4 months ago

2.0.1

4 months ago

2.0.0

5 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago