mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-11 20:40:42 +00:00
push
This commit is contained in:
parent
3ce0db9d2a
commit
a241de97f6
3 changed files with 29 additions and 2 deletions
|
|
@ -116,7 +116,7 @@ echo "📊 File size: $(du -h ${timestamp}.zip | cut -f1)"
|
||||||
|
|
||||||
# Check server health before upload
|
# Check server health before upload
|
||||||
echo "🔍 Checking server status..."
|
echo "🔍 Checking server status..."
|
||||||
if ! curl --max-time 10 --connect-timeout 5 -s -o /dev/null "$serverHost/api/manifest"; then
|
if ! curl --http1.1 --max-time 10 --connect-timeout 5 -s -o /dev/null "$serverHost/api/manifest"; then
|
||||||
echo "⚠️ Warning: Server may be slow or unresponsive"
|
echo "⚠️ Warning: Server may be slow or unresponsive"
|
||||||
echo "💡 Proceeding with upload anyway..."
|
echo "💡 Proceeding with upload anyway..."
|
||||||
else
|
else
|
||||||
|
|
@ -131,7 +131,7 @@ retry_count=0
|
||||||
while [ $retry_count -lt $max_retries ]; do
|
while [ $retry_count -lt $max_retries ]; do
|
||||||
echo "🔄 Upload attempt $((retry_count + 1))/$max_retries..."
|
echo "🔄 Upload attempt $((retry_count + 1))/$max_retries..."
|
||||||
|
|
||||||
response=$(curl --max-time 300 --connect-timeout 30 -X POST $serverHost/api/upload \
|
response=$(curl --http1.1 --max-time 300 --connect-timeout 30 -X POST $serverHost/api/upload \
|
||||||
-F "file=@${timestamp}.zip" \
|
-F "file=@${timestamp}.zip" \
|
||||||
-F "runtimeVersion=$runtimeVersion" \
|
-F "runtimeVersion=$runtimeVersion" \
|
||||||
-F "commitHash=$commitHash" \
|
-F "commitHash=$commitHash" \
|
||||||
|
|
|
||||||
|
|
@ -850,6 +850,26 @@ const HeroSection: React.FC<HeroSectionProps> = memo(({
|
||||||
trailerOpacity.value = withTiming(0, { duration: 300 });
|
trailerOpacity.value = withTiming(0, { duration: 300 });
|
||||||
thumbnailOpacity.value = withTiming(1, { duration: 300 });
|
thumbnailOpacity.value = withTiming(1, { duration: 300 });
|
||||||
}, [trailerOpacity, thumbnailOpacity]);
|
}, [trailerOpacity, thumbnailOpacity]);
|
||||||
|
|
||||||
|
// Handle trailer end - seamless transition back to thumbnail
|
||||||
|
const handleTrailerEnd = useCallback(() => {
|
||||||
|
logger.info('HeroSection', 'Trailer ended - transitioning back to thumbnail');
|
||||||
|
setTrailerPlaying(false);
|
||||||
|
|
||||||
|
// Reset trailer state to prevent auto-restart
|
||||||
|
setTrailerReady(false);
|
||||||
|
setTrailerPreloaded(false);
|
||||||
|
|
||||||
|
// Smooth fade transition: trailer out, thumbnail in
|
||||||
|
trailerOpacity.value = withTiming(0, { duration: 500 });
|
||||||
|
thumbnailOpacity.value = withTiming(1, { duration: 500 });
|
||||||
|
|
||||||
|
// Show UI elements again
|
||||||
|
actionButtonsOpacity.value = withTiming(1, { duration: 500 });
|
||||||
|
genreOpacity.value = withTiming(1, { duration: 500 });
|
||||||
|
titleCardTranslateY.value = withTiming(0, { duration: 500 });
|
||||||
|
watchProgressOpacity.value = withTiming(1, { duration: 500 });
|
||||||
|
}, [trailerOpacity, thumbnailOpacity, actionButtonsOpacity, genreOpacity, titleCardTranslateY, watchProgressOpacity, setTrailerPlaying]);
|
||||||
|
|
||||||
// Memoized image source
|
// Memoized image source
|
||||||
const imageSource = useMemo(() =>
|
const imageSource = useMemo(() =>
|
||||||
|
|
@ -1320,6 +1340,7 @@ const HeroSection: React.FC<HeroSectionProps> = memo(({
|
||||||
onFullscreenToggle={handleFullscreenToggle}
|
onFullscreenToggle={handleFullscreenToggle}
|
||||||
onLoad={handleTrailerReady}
|
onLoad={handleTrailerReady}
|
||||||
onError={handleTrailerError}
|
onError={handleTrailerError}
|
||||||
|
onEnd={handleTrailerEnd}
|
||||||
onPlaybackStatusUpdate={(status) => {
|
onPlaybackStatusUpdate={(status) => {
|
||||||
if (status.isLoaded && !trailerReady) {
|
if (status.isLoaded && !trailerReady) {
|
||||||
handleTrailerReady();
|
handleTrailerReady();
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ interface TrailerPlayerProps {
|
||||||
onError?: (error: string) => void;
|
onError?: (error: string) => void;
|
||||||
onProgress?: (data: OnProgressData) => void;
|
onProgress?: (data: OnProgressData) => void;
|
||||||
onPlaybackStatusUpdate?: (status: { isLoaded: boolean; didJustFinish: boolean }) => void;
|
onPlaybackStatusUpdate?: (status: { isLoaded: boolean; didJustFinish: boolean }) => void;
|
||||||
|
onEnd?: () => void;
|
||||||
style?: any;
|
style?: any;
|
||||||
hideLoadingSpinner?: boolean;
|
hideLoadingSpinner?: boolean;
|
||||||
onFullscreenToggle?: () => void;
|
onFullscreenToggle?: () => void;
|
||||||
|
|
@ -49,6 +50,7 @@ const TrailerPlayer = React.forwardRef<any, TrailerPlayerProps>(({
|
||||||
onError,
|
onError,
|
||||||
onProgress,
|
onProgress,
|
||||||
onPlaybackStatusUpdate,
|
onPlaybackStatusUpdate,
|
||||||
|
onEnd,
|
||||||
style,
|
style,
|
||||||
hideLoadingSpinner = false,
|
hideLoadingSpinner = false,
|
||||||
onFullscreenToggle,
|
onFullscreenToggle,
|
||||||
|
|
@ -351,6 +353,10 @@ const TrailerPlayer = React.forwardRef<any, TrailerPlayerProps>(({
|
||||||
// Stop playback when trailer finishes to avoid continuous GPU/decoder use
|
// Stop playback when trailer finishes to avoid continuous GPU/decoder use
|
||||||
if (isComponentMounted) {
|
if (isComponentMounted) {
|
||||||
setIsPlaying(false);
|
setIsPlaying(false);
|
||||||
|
// Notify parent component that trailer has ended
|
||||||
|
if (onEnd) {
|
||||||
|
onEnd();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onFullscreenPlayerWillPresent={() => setIsFullscreen(true)}
|
onFullscreenPlayerWillPresent={() => setIsFullscreen(true)}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue