From 1363685af8db04c4cb2148dbefe82fc816e19aa0 Mon Sep 17 00:00:00 2001 From: Gustav Grusell Date: Mon, 17 Jun 2024 14:17:31 +0200 Subject: [PATCH] chore: fix prettier errors Signed-off-by: Gustav Grusell --- .github/workflows/publish-docker.yml | 1 - README.md | 27 ++++++++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index a96d04e..f76ab75 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -38,4 +38,3 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - diff --git a/README.md b/README.md index 6a8083b..ab52f23 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,13 @@ CLI and library for creating a streaming bundle from an ABR bundle [shaka-packager](https://github.com/shaka-project/shaka-packager). Input and output can be in S3 buckets. ## Requirements + shaka-packager executable must be available in path under the name `packager`. When using S3 for input and output the AWS CLI must be installed and configured. ## Usage + ### CLI + ``` > npm install -g shaka-packager-s3 > shaka-packager-s3 s3://source-bucket/folder s3://output-bucket/folder -i a:1=audio.mp4 -i v:1=video.mp4 @@ -15,25 +18,34 @@ shaka-packager executable must be available in path under the name `packager`. W ``` ### Library + ```javascript import { Input, doPackage } from '@eyevinn/shaka-packager-s3'; -const inputs = [{ +const inputs = [ + { type: 'audio', key: '1', filename: 'audio.mp4' - }, { + }, + { type: 'video', key: '1', filename: 'video.mp4' - }]; + } +]; const dest = '/my/output/folder'; doPackage({ - dest, - inputs, -}).then(() => {console.log('done')}).catch((err) => {console.error(err)}); - + dest, + inputs +}) + .then(() => { + console.log('done'); + }) + .catch((err) => { + console.error(err); + }); ``` ### Docker @@ -60,6 +72,7 @@ docker run --rm \ ## Development Prerequisites: + - shaka-packager - AWS cli