mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 10:23:24 +00:00
chore: formatting
This commit is contained in:
@@ -15,7 +15,10 @@ import { useLocalSearchParams, useRouter } from "expo-router";
|
|||||||
import * as StatusBar from "expo-status-bar";
|
import * as StatusBar from "expo-status-bar";
|
||||||
|
|
||||||
import type { ScrapeMedia, Stream } from "@movie-web/provider-utils";
|
import type { ScrapeMedia, Stream } from "@movie-web/provider-utils";
|
||||||
import { extractTracksFromHLS, findHighestQuality } from "@movie-web/provider-utils";
|
import {
|
||||||
|
extractTracksFromHLS,
|
||||||
|
findHighestQuality,
|
||||||
|
} from "@movie-web/provider-utils";
|
||||||
|
|
||||||
import type { ItemData } from "~/components/item/item";
|
import type { ItemData } from "~/components/item/item";
|
||||||
import type { HeaderData } from "~/components/player/Header";
|
import type { HeaderData } from "~/components/player/Header";
|
||||||
@@ -166,7 +169,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ data }) => {
|
|||||||
|
|
||||||
let highestQuality;
|
let highestQuality;
|
||||||
let url;
|
let url;
|
||||||
let tracks;
|
let tracks;
|
||||||
|
|
||||||
switch (stream.type) {
|
switch (stream.type) {
|
||||||
case "file":
|
case "file":
|
||||||
@@ -175,12 +178,15 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ data }) => {
|
|||||||
return url ?? null;
|
return url ?? null;
|
||||||
case "hls":
|
case "hls":
|
||||||
url = stream.playlist;
|
url = stream.playlist;
|
||||||
tracks = await extractTracksFromHLS(url, { ...stream.preferredHeaders, ...stream.headers });
|
tracks = await extractTracksFromHLS(url, {
|
||||||
|
...stream.preferredHeaders,
|
||||||
|
...stream.headers,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tracks) {
|
if (tracks) {
|
||||||
console.log(tracks);
|
console.log(tracks);
|
||||||
}
|
}
|
||||||
|
|
||||||
setVideoSrc({
|
setVideoSrc({
|
||||||
uri: url,
|
uri: url,
|
||||||
|
Reference in New Issue
Block a user