mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
chore: adjust fuction name
This commit is contained in:
@@ -11,7 +11,7 @@ import * as ScreenOrientation from "expo-screen-orientation";
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
findHighestQuality,
|
findHighestQuality,
|
||||||
getVideoUrl,
|
getVideoStream,
|
||||||
transformSearchResultToScrapeMedia,
|
transformSearchResultToScrapeMedia,
|
||||||
} from "@movie-web/provider-utils";
|
} from "@movie-web/provider-utils";
|
||||||
import { fetchMediaDetails } from "@movie-web/tmdb";
|
import { fetchMediaDetails } from "@movie-web/tmdb";
|
||||||
@@ -67,7 +67,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ data }) => {
|
|||||||
episode,
|
episode,
|
||||||
);
|
);
|
||||||
|
|
||||||
const stream = await getVideoUrl(scrapeMedia);
|
const stream = await getVideoStream(scrapeMedia);
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
await ScreenOrientation.lockAsync(
|
await ScreenOrientation.lockAsync(
|
||||||
ScreenOrientation.OrientationLock.PORTRAIT_UP,
|
ScreenOrientation.OrientationLock.PORTRAIT_UP,
|
||||||
|
@@ -11,7 +11,9 @@ import {
|
|||||||
targets,
|
targets,
|
||||||
} from "@movie-web/providers";
|
} from "@movie-web/providers";
|
||||||
|
|
||||||
export async function getVideoUrl(media: ScrapeMedia): Promise<Stream | null> {
|
export async function getVideoStream(
|
||||||
|
media: ScrapeMedia,
|
||||||
|
): Promise<Stream | null> {
|
||||||
const providers = makeProviders({
|
const providers = makeProviders({
|
||||||
fetcher: makeStandardFetcher(fetch),
|
fetcher: makeStandardFetcher(fetch),
|
||||||
target: targets.NATIVE,
|
target: targets.NATIVE,
|
||||||
|
Reference in New Issue
Block a user