mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +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, 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,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user