mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-01 01:52:52 +01:00
Go back to vlc4
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import { requireNativeViewManager } from "expo-modules-core";
|
||||
import * as React from "react";
|
||||
|
||||
import { VideoPlayer, useSettings } from "@/utils/atoms/settings";
|
||||
import { Platform, ViewStyle } from "react-native";
|
||||
import { ViewStyle } from "react-native";
|
||||
import type {
|
||||
VlcPlayerSource,
|
||||
VlcPlayerViewProps,
|
||||
@@ -14,22 +12,10 @@ interface NativeViewRef extends VlcPlayerViewRef {
|
||||
}
|
||||
|
||||
const VLCViewManager = requireNativeViewManager("VlcPlayer");
|
||||
const VLC3ViewManager = requireNativeViewManager("VlcPlayer3");
|
||||
|
||||
// Create a forwarded ref version of the native view
|
||||
const NativeView = React.forwardRef<NativeViewRef, VlcPlayerViewProps>(
|
||||
(props, ref) => {
|
||||
const [settings] = useSettings();
|
||||
|
||||
if (Platform.OS === "ios" || Platform.isTVOS) {
|
||||
if (settings.defaultPlayer === VideoPlayer.VLC_3) {
|
||||
console.log("[Apple] Using Vlc Player 3");
|
||||
return <VLC3ViewManager {...props} ref={ref} />;
|
||||
}
|
||||
}
|
||||
console.log("Using default Vlc Player");
|
||||
return <VLCViewManager {...props} ref={ref} />;
|
||||
},
|
||||
(props, ref) => <VLCViewManager {...props} ref={ref} />,
|
||||
);
|
||||
|
||||
const VlcPlayerView = React.forwardRef<VlcPlayerViewRef, VlcPlayerViewProps>(
|
||||
|
||||
Reference in New Issue
Block a user