Last active
March 30, 2021 02:59
-
-
Save sb2702/5518427ffb4cce0efa9a36da40b00294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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