some fonts
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,6 +2,7 @@
|
|||||||
import { useSpacetimeDB, useTable, useReducer } from "spacetimedb/svelte";
|
import { useSpacetimeDB, useTable, useReducer } from "spacetimedb/svelte";
|
||||||
import { tables, reducers } from "$lib/st-bindings";
|
import { tables, reducers } from "$lib/st-bindings";
|
||||||
import JASSUB from "jassub";
|
import JASSUB from "jassub";
|
||||||
|
import font1 from "$lib/assets/fonts/trebuc_0.ttf";
|
||||||
|
|
||||||
const conn = useSpacetimeDB();
|
const conn = useSpacetimeDB();
|
||||||
|
|
||||||
@@ -23,10 +24,12 @@
|
|||||||
let jassubInstance: any | undefined;
|
let jassubInstance: any | undefined;
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
|
console.log("effect-1");
|
||||||
if (videoElement && videoState?.subtitleUrl && videoState.subtitleUrl.endsWith(".ass")) {
|
if (videoElement && videoState?.subtitleUrl && videoState.subtitleUrl.endsWith(".ass")) {
|
||||||
jassubInstance = new JASSUB({
|
jassubInstance = new JASSUB({
|
||||||
video: videoElement,
|
video: videoElement,
|
||||||
subUrl: videoState.subtitleUrl,
|
subUrl: videoState.subtitleUrl,
|
||||||
|
fonts: [font1],
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
@@ -46,6 +49,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
|
console.log("effect-2");
|
||||||
if (!videoElement || !videoState) return;
|
if (!videoElement || !videoState) return;
|
||||||
const el = videoElement;
|
const el = videoElement;
|
||||||
const state = videoState;
|
const state = videoState;
|
||||||
|
|||||||
Reference in New Issue
Block a user