1.0.6 • Published 7 years ago

aliyun-mts v1.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

aliyun-mts

npm

aliyun mts sdk

阿里云 MTS媒体转码服务 SDK

Installation

$ npm install aliyun-mts

Usage

const { SubmitJobs, queryJobList, listJob, cancelJob } = require('aliyun-mts')({
  AccessKeyId, // your access key id
  AccessKeySecret // your access secret
});
 
// new submit job
// arguments: https://help.aliyun.com/document_detail/29253.html?spm=5176.doc29227.6.603.AX3nBo
const job = new SubmitJobs({
  Input: {  // Input Object 
    Bucket, // input bucket name
    Location: "oss-cn-hangzhou", // input bucket location
    Object: 'test.mp4' // file path
  },
  OutputBucket, // output bucket name
  Outputs: [{
      OutputObject: "temp", // output file name (with out postfix if m3u8)
      TemplateId: "S00000001-100030" // output template
  }],
  OutputLocation: "oss-cn-hangzhou", // output bucket location
  PipelineId // pipeline id
});
 
// start job (return promise)
job.start();
 
// cancel job
cancelJob({
  jobId // a job id
});
 
// query jobs
queryJobList({
  jobIds: ['id1', 'id2']
});
 
// get jobs list
listJob();
1.0.6

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago