mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
refactor: update text track types and clean up imports across multiple stream providers
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Stream, ProviderContext, TextTracks, TextTrackType } from "../types";
|
||||
import { Stream, ProviderContext, TextTracks } from "../types";
|
||||
|
||||
export const getStream = async function ({
|
||||
link: id,
|
||||
@@ -26,8 +26,8 @@ export const getStream = async function ({
|
||||
uri: sub?.url,
|
||||
title: sub?.lang || "Undefined",
|
||||
type: sub?.url?.endsWith(".vtt")
|
||||
? TextTrackType.VTT
|
||||
: TextTrackType.SUBRIP,
|
||||
? "text/vtt"
|
||||
: "application/x-subrip",
|
||||
});
|
||||
});
|
||||
res.data?.sources.forEach((source: any) => {
|
||||
|
||||
Reference in New Issue
Block a user