Video by HeyTimDev · streamed from YouTube. All rights remain with the creator.
Lesson 9: Picking and Previewing Videos
About this lesson
In this tutorial, HeyTimDev extends the camera feature of the short-video app by adding the ability to select videos from the phone's gallery and upload them, using Expo's image picker. This means users are no longer limited to clips recorded inside the app, but can also share videos they filmed earlier. You learn how to integrate the image picker so that it opens the device's media library and lets the user choose a video. The video explains how to manage the permissions needed for accessing photos and videos on the phone, which are separate from the camera permissions set up previously. Before anything is uploaded, the selected video is previewed with a video player from Expo's audio and video library, so that the user can check that they have chosen the right clip. The tutorial also discusses the practical challenges of handling large video files and managing different video formats, since videos taken outside the app can be much bigger than short in-app recordings. Selected videos are then uploaded to Supabase Storage, reusing the storage set-up from the previous part, and organised in the app for a seamless experience. By the end of the video, the app can upload videos from both the camera and the phone's library, complete with a preview feature, and the next part of the series builds the home feed that displays uploaded videos in a scrollable list. Afterwards, read Chapter 9 of the course book, which works out how videos of different shapes fit the screen by hand.