remote-control/directional-pad (D-Pad) input. Click/Touch/Drag UX implementations are seldom compatible with a TV user experience, and TV devices often use less power than desktop and mobile devices. Optimize your web content by reducing animations for TV, for instance. For more guidance on performance and fluidity, see Development Best Practices for Web Apps.
Layers of the WebView stack
The following diagram shows the layers of the code stack for WebView.
Vega WebView architectural diagram
- WebView core components: The following set of core components offers a range of APIs that parse and render web content within a WebView window.
- Media stack: The OS API that provides access to hardware acceleration. It can also include the software audio and video decoder supported by the System-on-a-Chip (SoC) and Board Support Package (BSP) of the platform to decode a frame.
- DRM: The API that handles the digital rights management (DRM) license and keys. This API works with a decoder component to decrypt the frames in the ARM Trust Zone, or Trusted Execution Environment (TEE).
- Graphics: The API that provides the surface and subsurface for web content and media rendering.
- Keyboard: The service that provides an on-screen keyboard for WebView.
- App framework: The framework that provides a life-cycle manager, package manager, event manager, and more.
- Chromium: The Chromium web engine, optimized for Vega. The engine is responsible for parsing and rendering web pages, including HTML, CSS, and JavaScript.
- UI Framework: A cross-platform toolkit that supports a reactive programming, which is a declarative programming style, similar to React. The framework enables component developers to interact with operating system (OS) level API surfaces by exposing cross-platform API abstractions.
- Native Vega WebView Component: A component written in C++ that enables WebView for the developer.
- React Native WebView API: The software interface between Amazon and your React Native for Vega app.
- React Native for Vega App: An app created by the developer.
Quick setup of your web app
Step 1: Add an app template
Step 2: Add the required services to your manifest.toml file
Step 3: Import and use the WebView component in your App.tsx file
WebView props
For a full list of props for the WebView component, see Vega WebView Component Reference.Supported media formats
Vega Web App supports the following audio and video formats.Supported audio formats
- FLAC
- MP3
- Opus
- Vorbis
- AAC
- PCM 8-bit unsigned integer
- PCM 16-bit signed integer little endian
- PCM 24-bit signed integer little endian
- PCM 32-bit float little endian
- PCM 16-bit signed integer big endian
- PCM 24-bit signed integer big endian
- PCM μ-law
- PCM A-law
- AAC-LC
- AAC-SBR
- AAC-PS
- AAC Scalable (MPEG-2)
Supported video software formats
- Theora
- MPEG4 Part 2
Supported video hardware formats
- VP8
- VP9
- H.264
- H.265
Support for Digital Rights Management (DRM)
WebView currently supports Widevine and PlayReady. Widevine supportsHW_SECURE_ALL for video, and SW_SECURE_CRYPTO for audio. PlayReady supports SL3000 for video, and SL2000 for audio.
Checking if a device supports DRM content
WebView supports hardware DRM (Widevine L1 and PlayReady SL2000/3000), and software DRM (Widevine L3), as long as the device supports it. To check the availablily of DRM, Web Apps can userequestMediaKeySystemAccess method.
Usage notes
- The robustness field in the config determines the level of DRM being queried. Use
HW_SECURE_ALLfor hardware-backed DRM andSW_SECURE_CRYPTOfor software DRM. Audio is not supported through hardware, so useSW_SECURE_CRYPTOfor audio content. - If the device does not support the requested DRM configuration, the promise will reject.
- Check for both hardware and software DRM levels and gracefully fall back based on availability.
Unsupported features and known limitations
Unsupported features
- Geolocation
- File uploads or downloads
- Multiline text boxes
- Launching to external browser
- .mov files
- Advertising ID
- WebGPU
Known limitations
- Popups are limited - only popups that use Javascript
alert(), or<select>dropdown elements. General popups likewindow.open()is not supported.
Related topics
- Developer Guide for Web Apps
- Performance Best Practices for Web Apps
- Vega WebView Component Reference

