Skip to content

Commit 39f3451

Browse files
committed
updated readme design and replaceAsync
1 parent 8e3459b commit 39f3451

File tree

6 files changed

+38
-34
lines changed

6 files changed

+38
-34
lines changed

components/forms/create-playlist.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,19 @@ interface CreatePlaylistFormProps {
4040
videoData: VideoData[];
4141
}
4242

43+
const defaultValues = {
44+
title: "",
45+
description: "",
46+
videos: [],
47+
};
48+
4349
export default function CreatePlaylistForm({ videoData }: CreatePlaylistFormProps) {
4450
const [isSubmitting, setIsSubmitting] = useState(false);
4551
const addPlaylist = usePlaylistStore((state) => state.addPlaylist);
4652

4753
const form = useForm<CreatePlaylistFormData>({
4854
resolver: zodResolver(formSchema),
49-
defaultValues: {
50-
title: "",
51-
description: "",
52-
videos: [],
53-
},
55+
defaultValues,
5456
});
5557

5658
async function onSubmit(values: CreatePlaylistFormData) {
@@ -70,6 +72,7 @@ export default function CreatePlaylistForm({ videoData }: CreatePlaylistFormProp
7072
toast.error("Error creating playlist!");
7173
} finally {
7274
setIsSubmitting(false);
75+
form.reset(defaultValues);
7376
}
7477
}
7578

components/video-player.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default function VideoPlayer({ videoSources }: { videoSources: VideoMeta[
129129
</View>
130130
<View className="mr-8 flex-1">
131131
<Text
132-
className="text-lg font-semibold"
132+
className="text-lg font-semibold text-white"
133133
numberOfLines={1}>
134134
{videoSources[currentIndex].title}
135135
</Text>

assets/icons/logo.md renamed to design.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# App Logo Overview
1+
# App Design Overview
22

3-
This document describes the logos used for the app, their styles and how they were generated.
3+
This document outlines the app’s design, including themes, logos and asset generation.
44

55
---
66

@@ -64,3 +64,6 @@ iOS icons are generated in various sizes to support different device resolutions
6464
- **Background Color**: `#09090b`
6565

6666
---
67+
68+
## App Screenshot Generation
69+
All app screenshots were made using [Progressier](https://progressier.com/pwa-screenshots-generator).

hooks/useVideoPlayerControls.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function useVideoPlayerControls(videoSources: VideoMeta[], isThumbView?:
134134

135135
setCurrentIndex((prev) => {
136136
const next = prev + 1;
137-
player.replace(videoSources[next].videoUri);
137+
player.replaceAsync(videoSources[next].videoUri);
138138
return next;
139139
});
140140
}
@@ -177,7 +177,7 @@ export function useVideoPlayerControls(videoSources: VideoMeta[], isThumbView?:
177177
setHasEnded(false);
178178

179179
setCurrentIndex(0);
180-
player.replace(videoSources[0].videoUri);
180+
player.replaceAsync(videoSources[0].videoUri);
181181
player.play();
182182

183183
updateControlsVisible(0);
@@ -200,7 +200,7 @@ export function useVideoPlayerControls(videoSources: VideoMeta[], isThumbView?:
200200
function changeVideoSource(inverse: number) {
201201
const newIndex = (currentIndex + inverse + videoSources.length) % videoSources.length;
202202
setCurrentIndex(newIndex);
203-
player.replace(videoSources[newIndex].videoUri);
203+
player.replaceAsync(videoSources[newIndex].videoUri);
204204
}
205205

206206
function handleButtonPressIn() {

readme.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
# Pocket Player
22

3-
A simple mobile app to locally upload, store and watch videos.
3+
Android app to locally store and watch videos.
44

55
## Features
66

7-
- Upload videos from your device.
8-
- Store videos locally on the device.
9-
- Watch videos with a custom video player.
10-
- Lightweight and privacy-friendly (no cloud or network usage).
7+
- Import videos directly from your device.
8+
- Store and watch videos entirely offline.
9+
- Custom video player with enhanced controls.
10+
- Thumbnail generation and metadata extraction.
11+
- Lightweight and privacy-friendly — no cloud or network access.
1112

1213
## Tech Stack
1314

14-
- React Native with Expo.
15-
- Drizzle with SQLite for local storage.
16-
- Video player with custom video controls.
17-
- Thumbnail generation and metadata extraction.
15+
- React Native with Expo
16+
- Drizzle ORM with SQLite
17+
- State and storage: Zustand + react-native-mmkv
18+
- UI libraries: [RN Primitives](https://github.com/roninoss/rn-primitives), [RN Reusables](https://github.com/mrzachnugent/react-native-reusables), [Nativewind](https://github.com/nativewind/nativewind)
19+
20+
## Notes
21+
22+
- This app is intended for local use only. No data leaves your device.
23+
- Requires expo-dev-client; not compatible with Expo Go.
24+
- See the [app design overview](design.md) for themes, logos, and asset generation details.
1825

1926
## Install
2027

@@ -63,11 +70,12 @@ You can generate a smaller, optimized APK for your specific device using the pro
6370
./generate-device-apk.sh
6471
```
6572

66-
## Notes
73+
## Roadmap
6774

68-
- This app is intended for local use only. No data leaves your device.
69-
- Works best with dev clients. Expo Go is not supported.
75+
- [ ] Save timestamp of last view of video.
76+
- [key = `videoProgress:${videoId}`](lib/store.ts#L453)
77+
- value = `10` (player.currentTime | number | seconds)
7078

7179
## License
7280

73-
[MIT](LICENSE)
81+
[MIT License](LICENSE)

todo.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)