mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 08:03:26 +00:00
chore: more cleanup
This commit is contained in:
@@ -14,7 +14,7 @@ import * as NavigationBar from "expo-navigation-bar";
|
||||
import { useLocalSearchParams, useRouter } from "expo-router";
|
||||
import * as StatusBar from "expo-status-bar";
|
||||
|
||||
import type { ScrapeMedia, Stream } from "@movie-web/provider-utils";
|
||||
import type { HLSTracks, ScrapeMedia, Stream } from "@movie-web/provider-utils";
|
||||
import {
|
||||
extractTracksFromHLS,
|
||||
findHighestQuality,
|
||||
@@ -169,7 +169,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ data }) => {
|
||||
|
||||
let highestQuality;
|
||||
let url;
|
||||
let _tracks;
|
||||
let _tracks: HLSTracks | null;
|
||||
|
||||
switch (stream.type) {
|
||||
case "file":
|
||||
|
@@ -106,7 +106,7 @@ export function findHighestQuality(
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export interface HLSPlaylist {
|
||||
export interface HLSTracks {
|
||||
video: Item[];
|
||||
audio: Item[];
|
||||
subtitles: Item[];
|
||||
@@ -115,7 +115,7 @@ export interface HLSPlaylist {
|
||||
export async function extractTracksFromHLS(
|
||||
playlistUrl: string,
|
||||
headers: Record<string, string>,
|
||||
): Promise<HLSPlaylist | null> {
|
||||
): Promise<HLSTracks | null> {
|
||||
try {
|
||||
const response = await fetch(playlistUrl, { headers }).then((res) =>
|
||||
res.text(),
|
||||
|
Reference in New Issue
Block a user