mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
fix types
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import { parse } from "hls-parser";
|
import { parse, types } from "hls-parser";
|
||||||
import { MasterPlaylist } from "hls-parser/types";
|
|
||||||
import { default as toWebVTT } from "srt-webvtt";
|
import { default as toWebVTT } from "srt-webvtt";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
@@ -116,7 +115,7 @@ export async function extractTracksFromHLS(
|
|||||||
);
|
);
|
||||||
const playlist = parse(response);
|
const playlist = parse(response);
|
||||||
if (!playlist.isMasterPlaylist) return null;
|
if (!playlist.isMasterPlaylist) return null;
|
||||||
if (!(playlist instanceof MasterPlaylist)) return null;
|
if (!(playlist instanceof types.MasterPlaylist)) return null;
|
||||||
|
|
||||||
const tracks = playlist.variants.map((variant) => {
|
const tracks = playlist.variants.map((variant) => {
|
||||||
return {
|
return {
|
||||||
|
Reference in New Issue
Block a user