as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

Media Player Set up

This topic specifies the core project settings and updates needed to incorporate the W3C Media Player into a React Native for Vega app.

Create a Vega App. For more details about creating an app, see Create a Vega App.

  • Open the package.json in your app folder. In the dependencies section, include the react-native-w3cmedia package.

    Copied to clipboard.

    "@amazon-devices/react-native-w3cmedia": "~2.1.80"
    
  • Open a terminal window and navigate to your app folder. Run npm to install the package in your app,

    Copied to clipboard.

      npm install
    
  • Update your babel.config.js file, otherwise the app throws a "ReferenceError: Property 'React' doesn't exist" exception during runtime.

    Copied to clipboard.

    module.exports = {
        presets: [ ['module:metro-react-native-babel-preset', { useTransformReactJSXExperimental: true }] ],
        plugins: [
          [
            '@babel/plugin-transform-react-jsx',
            {
              runtime: 'automatic',
            },
          ],
        ]
      };
    
  • Add the following permissions to the app manifest in the mainfest.toml file.

    Copied to clipboard.

    [wants]
    [[wants.service]]
    id = "com.amazon.mediametrics.service" # Required for metrics service
    
    [[wants.service]]
    id = "com.amazon.media.server"
    
    [[wants.service]]
    id = "com.amazon.gipc.uuid.*"
    
    [[wants.service]]
    id = "com.amazon.media.playersession.service"
    
    [[wants.privilege]]
    id = "com.amazon.devconf.privilege.accessibility" # Required for captions
    
    [[wants.service]]
    id = "com.amazon.mediabuffer.service"
    
    [[wants.service]]
    id = "com.amazon.mediatransform.service"
    
    [[wants.service]]
    id = "com.amazon.audio.stream"
    
    [[wants.service]]
    id = "com.amazon.audio.control"
    
    [offers]
    [[offers.service]]
    id = "com.amazon.gipc.uuid.*"
    

To play systemd sounds, you must add the following audio management service name:

  • com.amazon.audio.system - for all AudioManager API clients

Add the following entries to the mainfest.toml file:

Copied to clipboard.

[[wants.service]]
id = "com.amazon.audio.system"

Last updated: Sep 30, 2025