
function createTcVodInstance(getSignature, fileRaw,) {
    const tcVod = new TcVod.default({
        getSignature: getSignature
    });
    const uploader = tcVod.upload({
        mediaFile: fileRaw,
        // coverFile: imgFile,
    });
    return uploader;

}
// 进度条监听
function addMediaProgressListener(uploader, callback) {
    uploader.on('media_progress', function (info) {
        callback(info.percent);
    });
}
// 断点续传的监听
function addMediaUploadResumeListener(uploader, callback) {
    uploader.on('media_upload_resume', function () {
        callback();
    });
}
// 上传成功的监听
async function onDone(uploader, callback) {
    var info = await uploader.done();
    var fileObj = {
        'fileId': info.fileId,
        'url': info.video.url,
    }
    callback(JSON.stringify(fileObj));
}



// 取消上传
function cancelUpload(uploader) {
    uploader.cancel();
}
// 断点续传
function resumeUpload(uploader) {
    uploader.resume();
}
