UNPKG

paella-core

Version:
26 lines (20 loc) 679 B
import CanvasPlugin, { Canvas } from 'paella-core/js/core/CanvasPlugin'; export class AudioCanvas extends Canvas { constructor(player, videoContainer) { super('div', player, videoContainer); this.element.classList.add("image-canvas"); } async loadCanvas(player) { player.element.style.width = "100%"; player.element.style.height= "100%"; } } export default class AudioCanvasPlugin extends CanvasPlugin { get name() { return super.name || "es.upv.paella.audioCanvas"; } get canvasType() { return 'audio'; } getCanvasInstance(videoContainer) { return new AudioCanvas(this.player, videoContainer); } }