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.
A live demo you can freely edit is available on
Install the package with npm i @wcd/m4dz.apivideo-uploader
.
Then import the component in your application:
import "@wcd/m4dz.apivideo-uploader";
Load the component from any NPM-like CDN like UNPKG:
<script src="https://unpkg.com/@wcd/[email protected]/dist/index.js"></script>
Use the <av-uploader>
tag in your markup.
<av-uploader token="[api.video-user-token]" chunk-size="100"></av-uploader>
The component exposes configuration as properties.
Your api.video delegated token. Default: api.video sandbox token for demo purposes.
Size of the different chunks that will be uploaded, in Mbytes. Default: 10
(10000000
bytes). Recommended: 100
.
Enable a sandbox mode by passing sandbox="true"
to your component. It enables the sandbox endpoint. Default: false
.