@videothing/core

1.4.1 • Public • Published

4# Minimal example

videothing does not bundle its dependencies. You must include them yourself.

<!DOCTYPE html>
<head>
    <script src='https://unpkg.com/panzoom@8.0.0/dist/panzoom.min.js'></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.2.0/fabric.min.js'></script>
    <script src="videothing.umd.js"></script>
</head>
<body>
    <div id="main"></div>
    <script src="index.js"></script>
</body>
const { Container, VideoSource, Layers, tdm } = videothing;
const src = 'https://s3.amazonaws.com/diva-mturk-ingestion-prod/uuid-encoded/2018-12-12/00-05-00_00-10-00/G999_pilotsample/9c51f770-25c2-41bb-b244-cfea25bae3cd.mp4';
const trackSrc = 'example.tdm.json';
const root = document.getElementById('main');
const source = new VideoSource({ src , autoplay: false });
const container = new Container(source, root);
const trackstore = new tdm.TrackStore({});
const layer = new Layers.BasicTrack(trackstore);
container.register(new Layers.SourceNotReady());
container.register(layer);

For developers

See package.json

Readme

Keywords

none

Package Sidebar

Install

npm i @videothing/core

Weekly Downloads

0

Version

1.4.1

License

MIT

Unpacked Size

175 kB

Total Files

36

Last publish

Collaborators

  • sebastien.jourdain
  • bryonlewis
  • subdavis