From 2e41b2b373d5a057061a7694aa5e83001efeaf0f Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 26 Jan 2024 03:46:05 +0100 Subject: fix a bunch of stupid things regarding subtitles. still doesnt work --- web/script/player/jhls.d.ts | 20 +++++++++++--------- web/script/player/mediacaps.ts | 18 +++++++++++------- web/style/forms.css | 3 +++ web/style/nodepage.css | 5 +++-- 4 files changed, 28 insertions(+), 18 deletions(-) (limited to 'web') diff --git a/web/script/player/jhls.d.ts b/web/script/player/jhls.d.ts index 9030a88..9642c66 100644 --- a/web/script/player/jhls.d.ts +++ b/web/script/player/jhls.d.ts @@ -61,19 +61,21 @@ export interface SourceTrack { codec: string, language: string, } -export interface SourceTrackKind { - video?: { +export type SourceTrackKind = { + video: { width: number, height: number, fps: number, - }, - audio?: { - channels: number, - sample_rate: number, - bit_depth: number, - }, - subtitles?: boolean, // incorrect but lazy rn + } } + | { + audio: { + channels: number, + sample_rate: number, + bit_depth: number, + } + } | "subtitles"; + export interface EncodingProfile { video?: { codec: string, diff --git a/web/script/player/mediacaps.ts b/web/script/player/mediacaps.ts index 77a210e..ad1a037 100644 --- a/web/script/player/mediacaps.ts +++ b/web/script/player/mediacaps.ts @@ -21,13 +21,15 @@ export async function test_media_capability(track: SourceTrack): Promise