JSPM

s3-transcode

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q53061F

AWS transcoder client

Package Exports

  • s3-transcode

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (s3-transcode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

s3-transcode

AWS transcoder client.

Installation

$ npm install s3-transcode

Example

var Client = require('s3-transcode');

var client = new Client({
  key: "your aws key here",
  secret: "your aws secret here",
  region: "us-west-1"
});

client.pipelines(function(err, pipelines){
  if (err) throw err;
  console.log(pipelines);
});

API

Client()

Initialize a new Client.

Client.get(path:String)

GET path.

Client.post(path:String, body:Object)

POST body to path.

Client.pipelines(fn:Function)

Get list of pipelines.

Client.pipeline(id:String, fn:Function)

Get pipeline id.

Client.jobs(id:String, fn:Function)

Get jobs by pipeline id.

Client.jobsByStatus(fn:Function)

Get jobs by status, where status is one of:

  • "Submitted"
  • "Progressing"
  • "Completed"
  • "Canceled"
  • "Error"

Client.job(id:String, fn:Function)

Get job by id and invoke fn(err, job).

Client.createJob(job:Object, fn:Function)

Create job and invoke fn(err, job).

Example responses

.createJob()

{ Id: '1368211442908-007920',
  Input:
   { AspectRatio: 'auto',
     Container: 'mov',
     FrameRate: 'auto',
     Interlaced: 'auto',
     Key: 'ibdwc36ngnJ.mov',
     Resolution: 'auto' },
  Output:
   { Key: 'ibdwc36ngnJ.mp4',
     PresetId: '1351620000000-100070',
     Rotate: 'auto',
     Status: 'Submitted',
     StatusDetail: null,
     ThumbnailPattern: 'ibdwc36ngnJ-{count}' },
  PipelineId: '1368117054847-aeb165' }

.job()

{ Job:
   { Id: '1368211442908-007990',
     Input:
      { AspectRatio: 'auto',
        Container: 'mov',
        FrameRate: 'auto',
        Interlaced: 'auto',
        Key: 'ibdwc36ngnJ.mov',
        Resolution: 'auto' },
     Output:
      { Key: 'ibdwc36ngnJ-4.mp4',
        PresetId: '1351620000000-100070',
        Rotate: 'auto',
        Status: 'Error',
        StatusDetail: '3002 bdd0fac5-9318-48b0-8243-d1299dab9748: The specified object could not be saved in the specified bucket because an object by that name already exists: bucket=i.cloudup.com, key=ibdwc36ngnJ-00001.png.',
        ThumbnailPattern: 'ibdwc36ngnJ-{count}' },
     PipelineId: '1368117054847-aeb165' } }
  • Creating a job

License

MIT