feat: add more basic functionality (#5)

This commit is contained in:
Krzysztof Moch
2025-04-16 22:28:25 +02:00
committed by GitHub
parent 950dde6a7d
commit 047d74de38
15 changed files with 506 additions and 29 deletions
@@ -263,14 +263,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-frameworks.sh\"\n";
@@ -306,14 +302,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources.sh\"\n";
@@ -523,7 +515,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -592,7 +587,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
+8 -2
View File
@@ -12,7 +12,12 @@ import { VideoView, createSource, useVideoPlayer } from 'react-native-video';
const VideoDemo = () => {
const [show, setShow] = React.useState(false);
const player = useVideoPlayer('https://www.w3schools.com/html/mov_bbb.mp4');
const player = useVideoPlayer(
'https://www.w3schools.com/html/mov_bbb.mp4',
(_player) => {
_player.loop = true;
}
);
return (
<View style={styles.container}>
@@ -27,7 +32,8 @@ const VideoDemo = () => {
</View>
<Button title="Play" onPress={() => player.play()} />
<Button title="Pause" onPress={() => player.pause()} />
<Button title="Seek to 3sec" onPress={() => (player.currentTime = 3)} />
<Button title="Seek to 0sec" onPress={() => player.seekTo(0)} />
<Button title="Seek by 1sec" onPress={() => player.seekBy(1)} />
<Button
title={show ? 'Hide VideoView' : 'Show VideoView'}
onPress={() => setShow((prev) => !prev)}