VER-wasm 是一个视频编辑图形渲染框架,支持多图层、内置Timeline结构进行渲染和预览.
适用于任何非线性编辑产品,可跨平台集成。
渲染框架调试页面 sdk-render-index.html
-
商业合作 : [email protected] (麦女士)
- Function
let renderObject = window.CYL_createVideoEditRender(config);- Params
const config = {
PlayerContId: "render1",
APP_CANVAS_W: 640,
APP_CANVAS_H: 360,
LOADING_GIF: "dist-sdk/assets/icon-loading.gif"
}- Return
renderObject- Function
renderObject.main();- Params
void- Return
true/false- Function
renderObject.createTrace();- Params
void- Return
int 0/-1- Function
renderObject.pushNodeByIdx(0, materialList[0]);- Params
1) int: track index
2) MaterialObject: material object- Return
int 0/-1- Function
renderObject.getMaxTraceLen();- Params
void- Return
int track count- Function
renderObject.dumpMat(record=true/false);- Params
record=true/false- Return
Track Object- Function
renderObject.setLoadingMask(show=true/false);- Params
show=true/false- Return
int 0/-1- Function
reloadAllTraces(matTimeline);- Params
matTimelineObject (参考dumpMat返回值)- Return
void- Function
getShowMaxDuration();- Params
void- Return
double- Function
seek(double);- Params
double pts- Return
int 0/-1- Function
autoPlayPause();- Params
void- Return
int 0(to play)/1(to pause)- Function
play();- Params
void- Return
void- Function
pause();- Params
void- Return
void- Function
backStep();- Params
void- Return
void- Function
removeAll();- Params
void- Return
void- Function
removeTraceByIdx(int);- Params
int- Return
void- Function
removeRect();- Params
void- Return
void- Function
createTrace(int);- Params
int
-1 : add 1 track
> 0: size=all track size- Return
int 0/-1- Function
rmNodeByTagId(int);- Params
int- Return
int 0/-1- Function
rmNodeByTraceIdxNodeIdx(int traceIdx, int nodeIdx);- Params
int traceIdx, int nodeIdx- Return
int 0/-1- Function
getCanvasNodeTagID(int);- Params
int- Return
node object- Function
exitRoiRect();- Params
void- Return
void- Function
fullScreen();- Params
void- Return
void- Function
closeFullScreen();- Params
void- Return
void- Function
beginCrop(int);- Params
int- Return
void- Function
set_tag_GL_MvHoriMirror(int);- Params
int- Return
void- Function
set_tag_GL_MvVertMirror(int);- Params
int- Return
void- Function
reset_tag_GL_HoriMirror(int);- Params
int- Return
void- Function
reset_tag_GL_VertMirror(int);- Params
int- Return
void- Function
angleTurn(bool);- Params
bool true:right false:left- Return
void- Function
moveByTraceIdxNodeIdx(int traceIdx, int nodeIdx, float moveMv);- Params
int traceIdx, int nodeIdx, float moveMv- Return
int 0/-1- Function
splitNodeByTraceIdxNodeIdx(int traceIdx, int nodeIdx, float startMv, float endMv);- Params
int traceIdx, int nodeIdx, float startMv, float endMv- Return
int 0/-1- Function
addShader(shaderName);- Params
const SHADER_NAME_DEFAULT = "default";
const SHADER_NAME_GRAY = "gray";
const SHADER_NAME_MIRROR_HORI = "mirrorhori";
const SHADER_NAME_MIRROR_VERT = "mirrorvert";
Enum shaderName
Example: SHADER_INTERFACE.SHADER_NAME_GRAY- Return
int 0/-1- Function
rmShader(shaderName);- Params
const SHADER_NAME_DEFAULT = "default";
const SHADER_NAME_GRAY = "gray";
const SHADER_NAME_MIRROR_HORI = "mirrorhori";
const SHADER_NAME_MIRROR_VERT = "mirrorvert";
Enum shaderName
Example: SHADER_INTERFACE.SHADER_NAME_GRAY- Return
int 0/-1- Function
clearShader();- Params
void- Return
int 0/-1- Function
setVolume(float);- Params
float[0.0-1.0]- Return
voidrenderObject.onVideoProbe = function(mediaInfo) {
console.log("CYL_createVideoEditRender - renderObject.onVideoProbe ", mediaInfo);
};
renderObject.onVideoPlayTime = function(pts) {
console.log("CYL_createVideoEditRender - renderObject.onVideoPlayTime ", pts);
};
renderObject.onVideoPlayFinished = function() {
console.log("CYL_createVideoEditRender - renderObject.onVideoPlayFinished ");
};
renderObject.onAddHistory = function(timelineJson) {
console.log("CYL_createVideoEditRender - renderObject.onAddHistory ", timelineJson);
};
renderObject.onRectLockTagID = function(tagId) {
console.log("CYL_createVideoEditRender - renderObject.onRectLockTagID ", tagId);
};
renderObject.onClickTagID = function(tagId) {
console.log("CYL_createVideoEditRender - renderObject.onClickTagID ", tagId);
};
renderObject.onUnselectTagId = function() {
console.log("CYL_createVideoEditRender - renderObject.onUnselectTagId ");
};
