Add VideoPlaybackScreen to Stack.Navigator
Now that we have a VideoPlayback screen we need to add it to our Stack.Navigator so that we can access it as part of our Navigation.- Open
App.tsx. - Import the VideoPlaybackScreen from screens
- Add a new
Stack.Screencalled VideoPlaybackScreen and set it to render the new VideoPlaybackScreen component.
Navigate to VideoPlaybackScreen
Now we can launch our VideoPlaybackScreen when we click on the “Watch now button”- Open
VideoDetailScreen.tsx - Update the pressFunction of the “Watch Now” button to navigate to the VideoPlayerScreen
- Give the navigation a prop of
videoURLand set it to the value ofvideoURL
Launch VideoPlaybackScreen
Now that we are passing data to VideoPlaybackScreen, let’s display it.- Open
VideoPlaybackScreen.tsx. - Add the navigation and route props to the screen
{ navigation, route }: any.
- Set the Text to
route.params.videoURL.
VideoPlaybackScreen.tsx should look like this:

Video screen with URI

