From 08bd76306d47c116b7da7a38ce0035bcd55fd521 Mon Sep 17 00:00:00 2001 From: ILOVEPIE Date: Mon, 4 Mar 2024 16:14:43 -0800 Subject: [PATCH] Fixed a few oversights with the last PR. --- package.json | 6 ++---- types/sabre.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index fbd3ed7..e1c39e5 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,9 @@ "description": "A gpu accelerated ecmascript renderer for Advanced Substation Alpha (ASS) subtitles. Renders .ass and .ssa files over video in the browser.", "main": "dist/sabre.min.js", "types": "types/sabre.d.ts", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, "dependencies": { "opentype.js": "^1.3.4", + "codepage": "^1.15.0", "@types/offscreencanvas": "^2019.3.0" }, "repository": { @@ -38,7 +36,7 @@ "browser" ], "author": "Patrick \"ILOVEPIE\" Rhodes Martin & Contributors", - "license": "SEE LICENSE IN LICENCE.md", + "license": "See licence in LICENCE.md", "bugs": { "url": "https://github.com/SABRE-JS/SABRE.js/issues" }, diff --git a/types/sabre.d.ts b/types/sabre.d.ts index 844398e..1799d49 100644 --- a/types/sabre.d.ts +++ b/types/sabre.d.ts @@ -1,7 +1,7 @@ type CanvasDrawable = HTMLCanvasElement | OffscreenCanvas; type SABREOptions = { fonts?: Array, - subtitles?: string, + subtitles?: ArrayBuffer, colorSpace?:number, resolution?:number[], nativeResolution?:number[] @@ -28,9 +28,9 @@ declare namespace sabre { const FCC_PC: number; } class SABRERenderer { - constructor(loadFont: (name: string) => void, options?: SABREOptions); + constructor(options?: SABREOptions); - loadSubtitles(subsText: string, fonts: Array): void; + loadSubtitles(subs: ArrayBuffer, fonts: Array): void; setColorSpace(colorSpace: number, width?: number, height?: number): void;