refactor: update text track types and clean up imports across multiple stream providers

This commit is contained in:
himanshu8443
2025-06-18 13:39:34 +05:30
parent e3208db7b0
commit dc009266be
10 changed files with 87 additions and 288 deletions

View File

@@ -1,4 +1,4 @@
import { Stream, ProviderContext, TextTrackType, TextTracks } from "../types";
import { Stream, ProviderContext, TextTracks } from "../types";
export const getStream = async function ({
link: id,
@@ -22,9 +22,7 @@ export const getStream = async function ({
subtitles.push({
title: sub?.label,
language: sub?.land,
type: sub?.src?.includes(".vtt")
? TextTrackType.VTT
: TextTrackType.SUBRIP,
type: sub?.src?.includes(".vtt") ? "text/vtt" : "application/x-subrip",
uri: sub?.src,
});
});