Vectorly Upscaler Library

Vectorly Upscaler Library

Class

jwPlugin

new jwPlugin(jwplayer, config)

JW Player Plugin for upscaler. The class is accessible at vectorlyUpscaler.jwPlugin from vectorly-jwplayer.js library

Parameters

Example

<script src="https://cdn.vectorly.io/upscaler/v2/latest/vectorly-jwplayer.js"> </script>


<div id="myElement" width="1280px"></div>

<script>
  jwplayer("myElement").setup({
    width: 1280,
    height: 720,
    "playlist": [{
        "file": "your-video-file-url",
    }],
 }).on('ready', function () {
    const upscaler = new vectorlyUpscaler.jwPlugin(jwplayer, {
       token: "<your-token>"
    });
  })

</script>

Methods

changeNetwork(networkParams)

async changeNetwork - Change the model network and parameters being used to render

This method is still WIP. Expect some lag when changing the networks

Parameters

disable()

disable - Disables upscaler

enable()

enable - Enables upscaler

on(event, callback)

on - Register event listener

Parameters

  • event string

    Event type string. Can be load, error, start, stop;

  • callback function

    Function to be called on event fired

Example

Add upscaler event listeners to vectorlyUpscaler.jwPlugin

upscaler
   .on('load', function () {
       console.log("Upscaler initialized"); })
   .on('error', function () {
       console.log("Failed to initialize"); })
   .on('start', function () {
       console.log("Starting upscaling"); })
   .on('stop', function () {
       console.log("Stopping upscaling"); })

Listens to events