mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-21 10:21:46 +00:00
This update removes the XPRIME provider from internal settings, streamlining the provider management process. The HDRezka provider is now prioritized in the UI, improving user experience. Additionally, various components have been optimized for better performance, including enhancements to the VideoPlayer for improved buffering and seeking behavior on Android devices. The app's theme has been updated to a dark mode, and several dependencies have been upgraded for better stability and performance.
59 lines
No EOL
1.4 KiB
TypeScript
59 lines
No EOL
1.4 KiB
TypeScript
import React, { useEffect } from 'react';
|
|
import { View, Image, StyleSheet, Animated } from 'react-native';
|
|
import { colors } from '../styles/colors';
|
|
|
|
interface SplashScreenProps {
|
|
onFinish: () => void;
|
|
}
|
|
|
|
const SplashScreen = ({ onFinish }: SplashScreenProps) => {
|
|
// Animation value for opacity
|
|
const fadeAnim = new Animated.Value(1);
|
|
|
|
useEffect(() => {
|
|
// Wait for a short period then start fade out animation
|
|
const timer = setTimeout(() => {
|
|
Animated.timing(fadeAnim, {
|
|
toValue: 0,
|
|
duration: 800,
|
|
useNativeDriver: true,
|
|
}).start(() => {
|
|
// Call onFinish when animation completes
|
|
onFinish();
|
|
});
|
|
}, 1500); // Show splash for 1.5 seconds
|
|
|
|
return () => clearTimeout(timer);
|
|
}, [fadeAnim, onFinish]);
|
|
|
|
return (
|
|
<Animated.View style={[styles.container, { opacity: fadeAnim }]}>
|
|
<Image
|
|
source={require('../../assets/splash-icon.png')}
|
|
style={styles.image}
|
|
resizeMode="contain"
|
|
/>
|
|
</Animated.View>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
backgroundColor: colors.darkBackground,
|
|
position: 'absolute',
|
|
top: 0,
|
|
left: 0,
|
|
right: 0,
|
|
bottom: 0,
|
|
zIndex: 10,
|
|
},
|
|
image: {
|
|
width: '70%',
|
|
height: '70%',
|
|
},
|
|
});
|
|
|
|
export default SplashScreen;
|