Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
Ring
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ
This walkthrough builds the smallest possible video app for Vega OS: a single screen that loads one progressive MP4 file and plays it. It uses URL playback mode, so you don’t need Shaka Player, DASH, HLS, or DRM to get a picture on screen. When you finish, you’ll have a working app you can extend into an adaptive streaming app. For background on how the playback stack fits together, see W3C Media API in React Native for Vega.

Prerequisites

  • A Vega app created from a template. For instructions, see Build Your App.
  • The W3C Media Player dependency, Babel configuration, and manifest permissions in place. For instructions, see Media Player Setup.
  • A Fire TV device or emulator that you can deploy to.

Build the app

1

Confirm your dependency

Your package.json file must include the W3C Media package:
Then install it:
2

Create the player screen

Create a file named src/HelloWorldPlayer.tsx with the following content. This is the whole app: a VideoPlayer instance that owns playback state, and a KeplerVideoView that renders the video surface.
3

Render the screen from your app entry point

Point your app root at the new screen.
4

Replace the video URL

Set VIDEO_URL to a media file your device can reach. URL mode supports MP4, MP3, MKV, FLV, OGG, and FLAC. If you point it at an HLS (.m3u8) or DASH (.mpd) manifest, playback fails — those require MSE mode and a JavaScript player. See Selecting Playback Mode.
5

Build, install, and run

Build your app and deploy it to your device or emulator. For the full command set, see Build Your App.The video plays full screen, and the status text under it updates as the player moves from Loaded to Playing.

Add play and pause

The VideoPlayer object exposes the standard HTMLMediaElement surface, so simple controls are a few lines. Wire this to a focusable button or a D-pad key handler:
You can also read currentTime, duration, and volume, and listen for timeupdate to drive a progress bar.

Troubleshooting

Next steps


最終更新日 2026年8月7日