as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ

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.Screen called VideoPlaybackScreen and set it to render the new VideoPlaybackScreen component.
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 videoURL and set it to the value of videoURL

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.
The updated code in VideoPlaybackScreen.tsx should look like this:
Video screen with URI

Video screen with URI

Congratulations! You’ve successfully completed the Vega Video App tutorial! 🎉 Your Vega app now has the essential functionality to display and play videos with proper navigation between screens. You’ve built a solid foundation for a video streaming application. Head over to the next page to see how you can continue your Vega journey.
最終更新日 2026年2月9日