diff --git a/frontend/src/screens/PodcastPlayer.tsx b/frontend/src/screens/PodcastPlayer.tsx index 70c3138a..50dfe5b7 100644 --- a/frontend/src/screens/PodcastPlayer.tsx +++ b/frontend/src/screens/PodcastPlayer.tsx @@ -48,11 +48,7 @@ const PodcastPlayer = ({navigation, route}: PodcastPlayerScreenProps) => { : require('../../assets/sounds/funny-cartoon-sound-397415.mp3'), ); - const formatPlaybackSpeed = (playbackSpeed: number) => - Number.isInteger(playbackSpeed) - ? `${playbackSpeed}x` - : `${playbackSpeed}x`; - + const formatPlaybackSpeed = (playbackSpeed: number) => `${playbackSpeed}x`; const formatSecTime = (seconds: number) => { const hours = Math.floor(seconds / 3600); const mins = Math.floor((seconds % 3600) / 60); @@ -79,7 +75,7 @@ const PodcastPlayer = ({navigation, route}: PodcastPlayerScreenProps) => { if (!player) return; // If the track has fully finished, restart from the beginning. // Otherwise resume from the current paused position. - if (duration > 0 && !isNaN(duration) && position >= duration - 0.5){ + if (duration > 0 && !isNaN(duration) && position >= duration - 0.5) { await player.seekTo(0); setPosition(0); } @@ -91,7 +87,6 @@ const PodcastPlayer = ({navigation, route}: PodcastPlayerScreenProps) => { const handlePause = async () => { console.log('Pause called'); if (!player) return; - player.pause(); setUiState('paused'); setIsPlaying(false); @@ -156,7 +151,6 @@ const PodcastPlayer = ({navigation, route}: PodcastPlayerScreenProps) => { } }; - const handlePostSubmit = async () => { if (!isConnected) { Alert.alert('Please check your internet and try again!'); @@ -194,7 +188,6 @@ const PodcastPlayer = ({navigation, route}: PodcastPlayerScreenProps) => { console.log('Image', uploadedUrl); if (uploadedUrl && audioUrl) { - uploadPodcast( { title: title, @@ -295,7 +288,6 @@ const PodcastPlayer = ({navigation, route}: PodcastPlayerScreenProps) => { } }, [error, handleUpload, imageError]); - // if(uploadPodcastPending){ // return // } @@ -308,7 +300,7 @@ const PodcastPlayer = ({navigation, route}: PodcastPlayerScreenProps) => { paddingTop="$8" justifyContent="space-between"> {/* Header Section */} - + { letterSpacing={1}> NOW PLAYING - + {title} - + {description} @@ -356,7 +362,10 @@ const PodcastPlayer = ({navigation, route}: PodcastPlayerScreenProps) => { {/* Waveform Visualization */} {/* height={80} gives 16px of breathing room around the waveform's internal MAX_HEIGHT+16 (64px) container */} - + {/* Progress Slider Section */} @@ -519,4 +528,3 @@ const styles = StyleSheet.create({ color: '#777', }, }); - diff --git a/frontend/src/screens/PodcastRecorder.tsx b/frontend/src/screens/PodcastRecorder.tsx index 2d76b965..796cc951 100644 --- a/frontend/src/screens/PodcastRecorder.tsx +++ b/frontend/src/screens/PodcastRecorder.tsx @@ -66,7 +66,6 @@ const PodcastRecorder = ({navigation, route}: PodcastRecorderScreenProps) => { const status = await AudioModule.requestRecordingPermissionsAsync(); if (!status.granted) { Alert.alert('Permission to access microphone was denied'); - } const storageGranted = await requestStoragePermissions(); @@ -242,7 +241,11 @@ const PodcastRecorder = ({navigation, route}: PodcastRecorderScreenProps) => { {/* Header Section */} - + Podcast Studio @@ -275,17 +278,27 @@ const PodcastRecorder = ({navigation, route}: PodcastRecorderScreenProps) => { {/* Timer Display */} - + + fontFamily={'monospace' as any}> {recordTime} - {uiState === 'recording' ? 'RECORDING IN PROGRESS' : uiState === 'review' ? 'RECORDING COMPLETE' : 'READY TO RECORD'} + {uiState === 'recording' + ? 'RECORDING IN PROGRESS' + : uiState === 'review' + ? 'RECORDING COMPLETE' + : 'READY TO RECORD'} @@ -393,11 +406,25 @@ const PodcastRecorder = ({navigation, route}: PodcastRecorderScreenProps) => { {/* Article Title Display */} - + PODCAST TITLE - + {title}