- The Content Launcher API
- Vega Media Controls API
- Account Login API
Vega Media Content Launcher common use cases
To begin using Vega Media Content Launcher APIs, follow these steps.- Instantiate a new
ContentLauncherServerComponent. Develop a handler object that encapsulates the callback function. This function should return a Promise toILauncherResponse, which is created using theContentLauncherServerComponentinstance. The way search parameters are retrieved is explained later in this guide. The callback function should:- Process the content launch request.
- Set the appropriate status in the
LauncherResponse:ContentLauncherStatusType.SUCCESSif the request is successfully processed.ContentLauncherStatusType.AUTH_FAILEDif authorization issues prevent processing.ContentLauncherStatusType.URL_NOT_AVAILABLEfor all other scenarios.
Implement the Content Launcher API
-
Define the Content Launcher handler.
Instantiate a new
ContentLauncherServerComponent. Develop a handler object that encapsulates the callback function.The handler should process the request, return a Promise toILauncherResponse, and create it with an instance of theContentLauncherServerComponent. Set the status ofcontentLauncherStatusforLauncherResponsetoContentLauncherStatusType.SUCCESSif your app successfully processed the request. Set the status toContentLauncherStatusType.AUTH_FAILEDif your app can’t process the request due to authorization issues. Set the status toContentLauncherStatusType.URL_NOT_AVAILABLEfor everything else. -
Implement the Vega Media Content Launcher in your interactive app.
- Obtain a singleton instance of
IContentLauncherServerAsync. ImplementIContentLauncherServerAsyncby using thegetOrMakeServermethod on yourContentLauncherServerComponentinstance. - Create a handler object to implement the
IContentLauncherHandlerinterface to process content launch requests. - Call the ‘setHandlerForComponent’ method for the ‘IContentLauncherServerAsync’ instance. This associates the handler with the correct component.
- Pass the handler and the appropriate
IComponentInstance.
- Obtain a singleton instance of
IComponentInstance using the useComponentInstance method. For React Native apps, set up the handler with the useEffecthook. It should initialize Content Launcher as soon as the component mounts and IComponentInstance is available. This integrates Content Launcher functionality into your component’s lifecycle, so your app handles Vega Content Launcher commands. This setup is important for apps with multiple components, so each component uses IComponentInstance, preventing confusion in callback routing.
Implementation details
The handleLaunchContent callback function takes three parameters:- An object implementing the
IContentSearchinterface. - A boolean value called
autoPlay. - Additional fields, passed as an object implementing the
ILaunchContentOptionalFieldsinterface.
IContentLauncherHandler handler takes one parameter that defines what content to play or show search results.
Determining action based on autoPlay
TheautoPlay parameter guides the handler’s behavior:
- When
autoPlayis set to true: This indicates a quick play request. The specified content should begin playback immediately without requiring any further user interaction. - When
autoPlayis set to false: In this case, the handler should present search results to the user instead of initiating playback. This allows the user to review and select from the available options.
autoPlay, the IContentLauncherHandler can efficiently manage content discovery and playback.
Retrieving search values
TheIContentSearch parameter holds the content information to be searched. The following schema is for values stored in IContentSearch.
parameterListhas one or more entries.contentSearch.getParameterList().lengthreturns the number of parameters. UsegetParameterList()to retrieve the full list. (Line 1 in the schema)- represents the type of entity listed in the parameter. For example, “type” is
ContentSearchParamType::VIDEOfor a movie or TV Show. See theContentSearchParamTypeenum for the full set of supported values. CallgetParamType()to fetch the type. (Line 1.1 in the schema) - represents the value of the entity mentioned in the type. Call
getValue()to retrieve this field. (Line 1.2 in the schema) Each parameter has zero or moreexternalIds. UsegetExternalIdList().length to get the size of the list.getExternalIdList()returns the full list. (Line 1.3 in the schema) - is retrieved by
getName(). The two recognized names are: (Line 1.3.1 in the schema) amzn_id — the catalog ID for the requested content. launch_url — a deep-link string supplied by external experiences, such as Matter Casting, that can be used directly to start playback. - represents the value of the
externalId. To retrieve the value, use getValue(). Foramzn_id, the value is the same or used in your catalog integration. Forlaunch_url, the value is the full deep link as provided by the requesting experience.
Content Launcher request examples
The following examples explaincontentSearch parameter values for some key Content Launcher use cases. This example lists all supported use cases. Content Launcher is invoked and the app launches for every use case.
The following sample catalog for streamz_us includes example entries for the movie Seabound and the TV show The SeaShow: The Real Story.
Launch content through the remote
Launch the movie Seabound using a remote from the Vega TV Home screen.tv.streamz/movie/46720000 for the LaunchId, and play it directly.
Quickplay with voice
Play movie Seabound through voice. Use the utterance “Alexa, Play Seabound.”autoPlay is true here. The following example includes the contentSearch: IContentSearch values. The app launches and it should play content directly using ID 1700000725.
Playing a specific episode with voice
The following catalog sample represents a TV Show SeaShow: The Real Story, its season, and an episode. The Alexa utterance “Alexa, Play Season 2 Episode 5 from The SeaShow: The Real Story,” invokes the app to play the specific episode.autoPlay is true here. contentSearch includes the show ID, not the episode ID. The app must identify the exact episode using ID 1700000123, ContentSearchParamType::SEASON, and ContentSearchParamType::EPISODE values.

