2.0.3 • Published 1 year ago

utils-cyj v2.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year 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

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago