From 094f9208a89601dcef5705a99a3137df5aad8781 Mon Sep 17 00:00:00 2001 From: Jelle van Snik Date: Wed, 11 Jan 2023 23:41:27 +0100 Subject: [PATCH] add quality to streams --- src/backend/embeds/testEmbedScraper.ts | 3 ++- src/backend/helpers/streams.ts | 6 ++++++ src/backend/providers/testProvider.ts | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/backend/embeds/testEmbedScraper.ts b/src/backend/embeds/testEmbedScraper.ts index 8498c0a2..b97c7f05 100644 --- a/src/backend/embeds/testEmbedScraper.ts +++ b/src/backend/embeds/testEmbedScraper.ts @@ -1,6 +1,6 @@ import { MWEmbedType } from "../helpers/embed"; import { registerEmbedScraper } from "../helpers/register"; -import { MWStreamType } from "../helpers/streams"; +import { MWStreamQuality, MWStreamType } from "../helpers/streams"; registerEmbedScraper({ id: "testembed", @@ -15,6 +15,7 @@ registerEmbedScraper({ return { streamUrl: "hello-world", type: MWStreamType.MP4, + quality: MWStreamQuality.Q1080P, }; }, }); diff --git a/src/backend/helpers/streams.ts b/src/backend/helpers/streams.ts index 6eb7257b..abcd9adc 100644 --- a/src/backend/helpers/streams.ts +++ b/src/backend/helpers/streams.ts @@ -3,7 +3,13 @@ export enum MWStreamType { HLS = "hls", } +export enum MWStreamQuality { + Q360P = "360p", + Q1080P = "1080p", +} + export type MWStream = { streamUrl: string; type: MWStreamType; + quality: MWStreamQuality; }; diff --git a/src/backend/providers/testProvider.ts b/src/backend/providers/testProvider.ts index 455325ca..21376d29 100644 --- a/src/backend/providers/testProvider.ts +++ b/src/backend/providers/testProvider.ts @@ -1,6 +1,6 @@ import { MWEmbedType } from "../helpers/embed"; import { registerProvider } from "../helpers/register"; -import { MWStreamType } from "../helpers/streams"; +import { MWStreamQuality, MWStreamType } from "../helpers/streams"; import { MWMediaType } from "../metadata/types"; registerProvider({ @@ -20,6 +20,7 @@ registerProvider({ stream: { streamUrl: "hello-world", type: MWStreamType.HLS, + quality: MWStreamQuality.Q1080P, }, embeds: [ {