mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 14:43:25 +00:00
feat: convert srt to vtt if required
This commit is contained in:
@@ -53,7 +53,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ data }) => {
|
||||
const fetchVideo = async () => {
|
||||
if (!data) return null;
|
||||
const { id, type } = data;
|
||||
const media = await fetchMediaDetails(id, type);
|
||||
const media = await fetchMediaDetails(id, type).catch(() => null);
|
||||
if (!media) return null;
|
||||
|
||||
const { result } = media;
|
||||
@@ -72,7 +72,10 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ data }) => {
|
||||
episode,
|
||||
);
|
||||
|
||||
const stream = await getVideoStream(scrapeMedia);
|
||||
const stream = await getVideoStream({
|
||||
media: scrapeMedia,
|
||||
forceVTT: true,
|
||||
}).catch(() => null);
|
||||
if (!stream) {
|
||||
await ScreenOrientation.lockAsync(
|
||||
ScreenOrientation.OrientationLock.PORTRAIT_UP,
|
||||
|
Reference in New Issue
Block a user