Code Monkey home page Code Monkey logo

jwplayer-s3-upload's Introduction

jwplayer-s3-upload

A NodeJS wrapper for uploading videos to JWPlayer via S3.

How it works

  • Uploads your video file to a bucket you own on S3
  • Sends a request to JWPlayer to process the uploaded video
  • Returns the file id from JWPlayer for your own storage

installation

npm install --save @iamsap/jwplayer-s3-upload

usage

var JWPlayerUploader = require('@iamsap/jwplayer-s3-upload');
var uploader = new JWPlayerUploader();
uploader.upload('/path/to/file.m4p', 'Look at me go!', function(err, response){
       console.log(JSON.stringify(response));
});

output

{
  "rate_limit": {
    "limit": 60,
    "remaining": 59,
    "reset": 1486914000
  },
  "status": "ok",
  "video": {
    "key": "nU2qBigV"
  }
}

config

.env.sample shows the environment variables jwplayer-s3-upload will use when connecting

export region=<aws-region>
export aws_access_key_id=<access-key-id>
export aws_secret_access_key=<secret-access-key-id>
export bucket=<bucket-name>

JWPlayer

You'll need to go to jwplayer.com and setup a free developer account. From there you will find your api key and secret. You will need those later.

Using Clack

Currently JWPlayer only supports python and php, so to make this work you'll need to install clack through the python package manager.

pip install --upgrade clack-cli
click init

Then you'll need to install keyring so you're not prompted for the password every time you use clack.

sudo pip install keyring

Clack requires that you setup the credentials in keyring so you won't be prompted for your api secret. Credentials for clack are stored in your config file at:

/Users/<username>/.clack/config.ini

jwplayer-s3-upload's People

Contributors

iamsap avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.