![]() |
Alexa Auto SDK
2.0.0
|
Classes | |
class | LocalMediaSourceState |
class | PlaybackState |
class | SessionState |
Public Types | |
enum | Source { Source::BLUETOOTH, Source::USB, Source::FM_RADIO, Source::AM_RADIO, Source::SATELLITE_RADIO, Source::LINE_IN, Source::COMPACT_DISC, Source::SIRIUS_XM, Source::DAB } |
enum | ContentSelector { ContentSelector::FREQUENCY, ContentSelector::CHANNEL, ContentSelector::PRESET } |
using | PlayControlType = ExternalMediaAdapter::PlayControlType |
Public Member Functions | |
virtual bool | play (ContentSelector contentSelectorType, const std::string &payload)=0 |
virtual bool | playControl (PlayControlType controlType)=0 |
virtual bool | seek (std::chrono::milliseconds offset)=0 |
virtual bool | adjustSeek (std::chrono::milliseconds deltaOffset)=0 |
virtual LocalMediaSourceState | getState ()=0 |
virtual bool | volumeChanged (float volume)=0 |
virtual bool | mutedStateChanged (MutedState state)=0 |
Source | getSource () |
void | playerEvent (const std::string &eventName) |
void | playerError (const std::string &errorName, long code, const std::string &description, bool fatal) |
void | setFocus () |
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.
using aace::alexa::LocalMediaSource::PlayControlType = ExternalMediaAdapter::PlayControlType |
|
strong |
|
strong |
|
pure virtual |
Called when the user calls play with a content selection type
[in] | ContentSelector | Content selection type |
[in] | payload | Content selector payload (i.e. "1", "98.7 FM HD 1") |
true
if the platform implementation successfully handled the call, else false
|
pure virtual |
Occurs during playback control via voice interaction or PlaybackController interface
[in] | controlType | Playback control type being invoked |
true
if the platform implementation successfully handled the call, else false
|
pure virtual |
Called when the user invokes media seek via speech.
[in] | offset | Offset position within media item, in milliseconds |
true
if the platform implementation successfully handled the call, else false
|
pure virtual |
Called when the user invokes media seek adjustment via speech.
[in] | deltaOffset | Change in offset position within media item, in milliseconds |
true
if the platform implementation successfully handled the call, else false
|
pure virtual |
Must provide the local media source , and information to maintain cloud sync
|
pure virtual |
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
|
pure virtual |
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
LocalMediaSource::Source aace::alexa::LocalMediaSource::getSource | ( | ) |
Return the source type the interface registered with
void aace::alexa::LocalMediaSource::playerEvent | ( | const std::string & | eventName | ) |
Should be called on a local media source player event. This will sync the context with AVS.
[in] | eventName | Canonical event name |
void aace::alexa::LocalMediaSource::playerError | ( | const std::string & | errorName, |
long | code, | ||
const std::string & | description, | ||
bool | fatal | ||
) |
Should be called on a local media source player error.
[in] | errorName | The name of the error |
[in] | code | The error code |
[in] | description | The detailed error description |
[in] | fatal | true if the error is fatal |
void aace::alexa::LocalMediaSource::setFocus | ( | ) |
Should be called on local media source player events. This will switch the media focus to that context.
Alexa Auto SDK 2.0.0 - Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0