0.2.0 • Published 10 years ago

wcjs-multiscreen-renderer v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

Renderer for WebChimera.js

Prerequisites

Install

npm install wcjs-multiscreen-renderer

Usage example

JS:

var wcjs = require("wcjs-multiscreen-renderer");

JavaScript API

setMainContext( vlc, context ): set main context for render:

  • context context object. It has two keys:
    • canvas - DOM object of desired object
    • window - Window object of this canvas. It uses to render in different windows
  • vlc vlc object, created with webchimera.js`s createPlayer() function

addAdditionalContext( context ): (optional) add another one context for render:

  • context context object. It has three keys:
    • id - unique id. Just for quick found and check already existed context
    • canvas - DOM object of desired object
    • window - Window object of this canvas. It uses to render in different windows

init(): initiate the renderer with all contexts added above.

removeContext( context ): set main context for render:

  • context context object. It has three keys:

    • id - unique id. Just for quick found and check already existed context
    • canvas - DOM object of desired object
    • window - Window object of this canvas. It uses to render in different windows

deinit(): Remove all contexts and execute clearCanvas().

clearCanvas(): draws a single black frame on the canvas, should be used after stopping the player and/or when the media file has changes (otherwise the frame from the previous video will be kept on the canvas)

0.2.0

10 years ago

0.1.16

10 years ago

0.1.15

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago