diff options
author | 2025-07-31 22:48:01 +0200 | |
---|---|---|
committer | 2025-07-31 22:48:01 +0200 | |
commit | e55f4c2fe8a6e1d62a0b005777b46c80e360d37e (patch) | |
tree | 1f9ad00b914f04677ffaf8b395a4c5d4ff659756 /src/user | |
download | videotool-e55f4c2fe8a6e1d62a0b005777b46c80e360d37e.tar.gz videotool-e55f4c2fe8a6e1d62a0b005777b46c80e360d37e.tar.bz2 videotool-e55f4c2fe8a6e1d62a0b005777b46c80e360d37e.tar.lz videotool-e55f4c2fe8a6e1d62a0b005777b46c80e360d37e.zip |
feat: initial commit
Diffstat (limited to 'src/user')
-rw-r--r-- | src/user/Sneky Snitch.mp4 | bin | 0 -> 1620945 bytes | |||
-rw-r--r-- | src/user/index.ts | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/user/Sneky Snitch.mp4 b/src/user/Sneky Snitch.mp4 Binary files differnew file mode 100644 index 0000000..b9d53b5 --- /dev/null +++ b/src/user/Sneky Snitch.mp4 diff --git a/src/user/index.ts b/src/user/index.ts new file mode 100644 index 0000000..2caf88c --- /dev/null +++ b/src/user/index.ts @@ -0,0 +1,21 @@ +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<void> { + // this.resize(this.canvas.clientWidth,this.canvas.clientHeight) + this.resize(1920, 1080) + this.ctx = this.canvas.getContext('2d')! + } + public renderFrame(time: FrameTime): Promise<void> | 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 +} |