import { Video as BaseVideo, type FrameTime } from '$/lib/Player/Video'; import SneakySnitchUrl from './Sneky Snitch.mp4?url' export default class Video extends BaseVideo { public ctx!: CanvasRenderingContext2D public init(): void | Promise { // this.resize(this.canvas.clientWidth,this.canvas.clientHeight) this.resize(1920, 1080) this.ctx = this.canvas.getContext('2d')! } public renderFrame(time: FrameTime): Promise | void { this.ctx.fillStyle = '#000' this.ctx.fillRect(0, 0, this.w, this.h) this.ctx.font = "50px Nunito"; this.ctx.fillStyle = '#fff' this.ctx.fillText(`${time.seconds.toFixed(3)}`, 0, 50) } public fps = 30; public length = 3 * this.fps; public audioUrl = ['sneakysnitch.mp4', SneakySnitchUrl] as const }