Skip to content

m4dz/apivideo-uploader__stenciljs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

backlight.dev webcomponents.dev components.studio

api.video - Stencil Web Component Uploader

A simple video uploader for the api.video platform. Made with Stencil.js. Based on Uploading large files with JavaScript: File.slice() to the rescue! tutorial.

Demo

A live demo you can freely edit is available on webcomponents.dev

Install

From NPM

Install the package with npm i @wcd/m4dz.apivideo-uploader.

Then import the component in your application:

import "@wcd/m4dz.apivideo-uploader";

In the Browser

Load the component from any NPM-like CDN like UNPKG:

<script src="https://unpkg.com/@wcd/m4dz.apivideo-uploader@0.1.0/dist/index.js"></script>

Usage

Use the <av-uploader> tag in your markup.

<av-uploader token="[api.video-user-token]" chunk-size="100"></av-uploader>

Configuration

The component exposes configuration as properties.

token (string | optional)

Your api.video delegated token. Default: api.video sandbox token for demo purposes.

chunk-size (number | optional)

Size of the different chunks that will be uploaded, in Mbytes. Default: 10 (10000000 bytes). Recommended: 100.

sandbox (boolean | optional)

Enable a sandbox mode by passing sandbox="true" to your component. It enables the sandbox endpoint. Default: false.

Links

Stencil