本文为您提供了服务端 Java SDK 的媒体处理模块相关的 API 调用示例。主要包含:提交任务流、提交媒体处理。
使用前请先完成初始化,参考 初始化
接口请求参数和返回参数详见 OpenAPI:提交任务流
import com.kuaishou.vod.core.Credential;
import com.kuaishou.vod.core.HttpProfile;
import com.kuaishou.vod.openapi.client.VodClient;
import com.kuaishou.vod.openapi.model.request.vod.ProcessingFlowRequest;
import com.kuaishou.vod.openapi.model.response.vod.ProcessingFlowResponse;
public class Demo {
public static void main(String[] args) throws Exception {
HttpProfile profile = HttpProfile.getDefault();
Credential credential = new Credential(<分配的access_key_id>, <分配的secret_key>);
VodClient client = new VodClient(profile, credential);
ProcessingFlowRequest request = new ProcessingFlowRequest();
request.mediaId = "媒资 ID";
request.workflowId = "工作流 ID";
ProcessingFlowResponse response = client.submitProcessingFlow(request);
System.out.println("response=" + response.getResponseMeta());
}
}