Skip to content

Instantly share code, notes, and snippets.

@sb2702
Last active March 30, 2021 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sb2702/5518427ffb4cce0efa9a36da40b00294 to your computer and use it in GitHub Desktop.
Save sb2702/5518427ffb4cce0efa9a36da40b00294 to your computer and use it in GitHub Desktop.
<head>
<link href="https://vjs.zencdn.net/7.10.2/video-js.css" rel="stylesheet" />
<script src="https://vjs.zencdn.net/7.10.2/video.min.js"></script>
<script src="https://cdn.vectorly.io/upscaler/latest/vectorly-videojs.js"></script>
</head>
<body>
<video id="my-video" class="video-js" controls width="1280" height="720" data-setup="{}" crossorigin="anonymous">
<source src="https://files.vectorly.io/demo/high-quality-240p/jellyfish-240p.mp4" type="video/mp4" />
</video>
<script>
videojs.registerPlugin('vectorlyPlugin', vectorlyUpscaler.videoJSPlugin);
const player = videojs('my-video');
const upscaler = player.vectorlyPlugin({token: '...'});
upscaler.addEventListener('load', function () {
console.log("Upscaler initialized");
});
upscaler.addEventListener('error', function () {
console.log("Failed to initialize");
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment