Code Monkey home page Code Monkey logo

wcjs-renderer's Introduction

WebChimera.js Renderer

Renderer for WebChimera.js

Prerequisites

Install

npm install wcjs-renderer

Usage example

HTML:

<canvas id="canvas"/>

JS:

var renderer = require("wcjs-renderer");
var vlc = require("wcjs-prebuilt").createPlayer();
var options = { /* Add renderer options here */ }
renderer.bind(document.getElementById("canvas"), vlc, options);
vlc.play("http://archive.org/download/CartoonClassics/Krazy_Kat_-_Keeping_Up_With_Krazy.mp4");

JavaScript API

  • bind(vlc, canvas, options): bind the Webchimera VLC player to a canvas element:

    • canvas can be a DOM node or selector (mandatory)
    • vlc is a VLC player created with WebChimera.js (mandatory)
    • options:
      • fallbackRenderer is a boolean mentioning if the fallback non-WebGL renderer should be used (optional, defaults to false),
      • preserveDrawingBuffer is a boolean mentioning if we should preserve the drawing buffer (optional, defaults to false),
      • onFrameSetup will be called when VLC's onFrameSetup callback is called, with the same arguments, after the canvas has been setup.
      • onFrameReady will be called when VLC's onFrameReady callback is called, with the same arguments, after the frame has been rendered to the canvas.
      • onFrameCleanup will be called when VLC's onFrameCleanup callback is called, with the same arguments, after the frame was cleaned up.
  • clear(canvas): draws a single black frame on a canvas element

wcjs-renderer's People

Contributors

alexbinary avatar guidupuy avatar ivshti avatar jaruba avatar luigiplr avatar rsatom avatar shenanigans avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.