![]() |
Alexa Auto SDK
2.3.0
|
Classes | |
enum | ContentSelector |
enum | Favorites |
enum | MediaType |
enum | PlayControlType |
enum | Source |
enum | SupportedPlaybackOperation |
Public Member Functions | |
boolean | play (ContentSelector selector, String payload) |
boolean | playControl (PlayControlType controlType) |
boolean | seek (long offset) |
boolean | adjustSeek (long deltaOffset) |
LocalMediaSourceState | getState () |
void | playerEvent (String eventName) |
void | playerError (String errorName, long code, String description, boolean fatal) |
void | setFocus (boolean focusAcquire) |
void | setFocus () |
final Source | getSource () |
boolean | volumeChanged (float volume) |
boolean | mutedStateChanged (MutedState state) |
LocalMediaSource
should be extended to use Alexa to switch among media sources local to the device. It supports bluetooth, USB, FM radio, AM radio, satellite radio, audio line, and CD player sources. It enables playback for these sources via Alexa (e.g. "Alexa, play the CD player"), or via the playback controller.
boolean com.amazon.aace.alexa.LocalMediaSource.play | ( | ContentSelector | selector, |
String | payload | ||
) |
Called when the user first calls play for the local media via voice control. ( Currently this is not used in LocalMediaSource)
true
if the platform implementation successfully handled the call, else false
boolean com.amazon.aace.alexa.LocalMediaSource.playControl | ( | PlayControlType | controlType | ) |
Occurs during playback control via voice interaction or PlaybackController interface
controlType | Playback control type being invoked |
true
if the platform implementation successfully handled the call, else false
boolean com.amazon.aace.alexa.LocalMediaSource.seek | ( | long | offset | ) |
Called when the user invokes local media seek via speech.
offset | Offset position within media item, in milliseconds |
true
if the platform implementation successfully handled the call, else false
boolean com.amazon.aace.alexa.LocalMediaSource.adjustSeek | ( | long | deltaOffset | ) |
Called when the user invokes local media adjust seek via speech.
deltaOffset | Change in offset position within media item, in milliseconds |
true
if the platform implementation successfully handled the call, else false
LocalMediaSourceState com.amazon.aace.alexa.LocalMediaSource.getState | ( | ) |
Must provide the local media source , and information to maintain cloud sync
LocalMediaSourceState
for the local media source, or null
if the state is not available void com.amazon.aace.alexa.LocalMediaSource.playerEvent | ( | String | eventName | ) |
Should be called on a local media source player event. This will sync the context with AVS.
eventName | Canonical event name |
void com.amazon.aace.alexa.LocalMediaSource.playerError | ( | String | errorName, |
long | code, | ||
String | description, | ||
boolean | fatal | ||
) |
Should be called on a local media source player error.
errorName | The name of the error |
code | The error code |
description | The detailed error description |
fatal | true if the error is fatal |
void com.amazon.aace.alexa.LocalMediaSource.setFocus | ( | boolean | focusAcquire | ) |
Should be called on local media source player events. This will switch the media focus to that context.
focusAcquire | true if focus should be acquired, false if focus should be abandoned |
void com.amazon.aace.alexa.LocalMediaSource.setFocus | ( | ) |
Overload of above for backward compatibility. Always acquires focus.
final Source com.amazon.aace.alexa.LocalMediaSource.getSource | ( | ) |
Return the source type the interface registered with
boolean com.amazon.aace.alexa.LocalMediaSource.volumeChanged | ( | float | volume | ) |
Notifies the platform implementation to set the volume of the output channel. The volume
value should be scaled to fit the needs of the platform.
[in] | volume | The volume to set on the output channel. volume is in the range [0,1]. |
true
if the platform implementation successfully handled the call, else false
boolean com.amazon.aace.alexa.LocalMediaSource.mutedStateChanged | ( | MutedState | state | ) |
Notifies the platform implementation to apply a muted state has changed for the output channel
[in] | state | The muted state to apply to the output channel. MutedState::MUTED when the output channel be muted, MutedState::UNMUTED when unmuted |
true
if the platform implementation successfully handled the call, else false
Alexa Auto SDK 2.3.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0