@videothing/core
v1.4.1
Published
4# Minimal example
Downloads
7
Keywords
Readme
4# Minimal example
videothing does not bundle its dependencies. You must include them yourself.
<!DOCTYPE html>
<head>
<script src='https://unpkg.com/[email protected]/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