AlexaClientSDK
1.19.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <Renderer.h>
Public Member Functions | |
void | start (std::shared_ptr< RendererObserverInterface > observer, std::function< std::pair< std::unique_ptr< std::istream >, const avsCommon::utils::MediaType >()> audioFactory, bool volumeRampEnabled, const std::vector< std::string > &urls=std::vector< std::string >(), int loopCount=0, std::chrono::milliseconds loopPause=std::chrono::milliseconds{0}, bool startWithPause=false) override |
void | stop () override |
void | onFirstByteRead (SourceId sourceId, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override |
void | onPlaybackStarted (SourceId sourceId, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override |
void | onPlaybackStopped (SourceId sourceId, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override |
void | onPlaybackFinished (SourceId sourceId, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override |
void | onPlaybackError (SourceId sourceId, const avsCommon::utils::mediaPlayer::ErrorType &type, std::string error, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override |
Public Member Functions inherited from alexaClientSDK::capabilityAgents::alerts::renderer::RendererInterface | |
virtual | ~RendererInterface ()=default |
virtual void | start (std::shared_ptr< capabilityAgents::alerts::renderer::RendererObserverInterface > observer, std::function< std::pair< std::unique_ptr< std::istream >, const avsCommon::utils::MediaType >()> audioFactory, bool volumeRampEnabled, const std::vector< std::string > &urls=std::vector< std::string >(), int loopCount=0, std::chrono::milliseconds loopPause=std::chrono::milliseconds{0}, bool startWithPause=false)=0 |
Public Member Functions inherited from alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface | |
virtual | ~MediaPlayerObserverInterface ()=default |
virtual void | onPlaybackPaused (SourceId id, const MediaPlayerState &state) |
virtual void | onPlaybackResumed (SourceId id, const MediaPlayerState &state) |
virtual void | onBufferUnderrun (SourceId id, const MediaPlayerState &state) |
virtual void | onBufferRefilled (SourceId id, const MediaPlayerState &state) |
virtual void | onBufferingComplete (SourceId id, const MediaPlayerState &state) |
virtual void | onTags (SourceId id, std::unique_ptr< const VectorOfTags > vectorOfTags, const MediaPlayerState &state) |
Static Public Member Functions | |
static std::shared_ptr< Renderer > | create (std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > mediaPlayer) |
Additional Inherited Members | |
Public Types inherited from alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface | |
enum | TagType { TagType::STRING, TagType::UINT, TagType::INT, TagType::DOUBLE, TagType::BOOLEAN } |
The different types of metadata "stream tags". More... | |
using | SourceId = MediaPlayerInterface::SourceId |
A type that identifies which source is currently being operated on. More... | |
typedef std::vector< TagKeyValueType > | VectorOfTags |
An implementation of an alert renderer. This class is thread-safe.
|
static |
Creates a Renderer
.
mediaPlayer | the MediaPlayerInterface that the Renderer object will interact with. |
Renderer
object.
|
overridevirtual |
This is an indication to the observer that the MediaPlayer
has read its first byte of data.
id | The id of the source to which this callback corresponds to. |
state | Metadata about the media player state |
Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.
|
overridevirtual |
This is an indication to the observer that the MediaPlayer
encountered an error. Errors can occur during playback.
MediaPlayer
from further processing.id | The id of the source to which this callback corresponds to. |
type | The type of error encountered by the MediaPlayerInterface . |
error | The error encountered by the MediaPlayerInterface . |
state | Metadata about the media player state |
Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.
|
overridevirtual |
This is an indication to the observer that the MediaPlayer
finished the source.
MediaPlayer
from further processing.id | The id of the source to which this callback corresponds to. |
state | Metadata about the media player state |
Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.
|
overridevirtual |
This is an indication to the observer that the MediaPlayer
has started playing the source specified by the id.
MediaPlayer
from further processing.id | The id of the source to which this callback corresponds to. |
state | Metadata about the media player state |
Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.
|
overridevirtual |
This is an indication to the observer that the MediaPlayer
has stopped the source.
MediaPlayer
from further processing.id | The id of the source to which this callback corresponds to. |
state | Metadata about the media player state |
Reimplemented from alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.
|
override |
|
overridevirtual |
Stop rendering.
Implements alexaClientSDK::capabilityAgents::alerts::renderer::RendererInterface.
AlexaClientSDK 1.19.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0