![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <NotificationRenderer.h>
Public Types | |
using | SourceId = avsCommon::utils::mediaPlayer::MediaPlayerInterface::SourceId |
A type that identifies which source is currently being operated on. More... | |
![]() | |
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 |
Static Public Member Functions | |
static std::shared_ptr< NotificationRendererInterface > | createNotificationRendererInterface (const std::shared_ptr< acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface > &audioPipelineFactory, acsdkManufactory::Annotated< avsCommon::sdkInterfaces::AudioFocusAnnotation, avsCommon::sdkInterfaces::FocusManagerInterface > audioFocusManager, const std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > &shutdownNotifier) |
static std::shared_ptr< NotificationRenderer > | create (std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > mediaPlayer, std::shared_ptr< avsCommon::sdkInterfaces::FocusManagerInterface > focusManager) |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const NotificationRenderer::State state) |
Additional Inherited Members |
Implementation of NotificationRendererInterface using the MediaPlayerInterface
using alexaClientSDK::acsdkNotifications::NotificationRenderer::SourceId = avsCommon::utils::mediaPlayer::MediaPlayerInterface::SourceId |
A type that identifies which source is currently being operated on.
|
override |
|
overridevirtual |
Cancel any ongoing rendering of a notification audio clip. Further render requests will be refused until an observer callback is made to indicate that rendering has finished (i.e. cancellation is complete).
Implements alexaClientSDK::acsdkNotificationsInterfaces::NotificationRendererInterface.
|
static |
Create a NotificationRenderer. The new NotificationRenderer starts life in the IDLE state, awaiting request to render notifications.
mediaPlayer | The MediaPlayer instance to use to render audio. |
focusManager | The FocusManager instance to use to request audio focus. |
|
static |
Create a NotificationRenderer. The new NotificationRenderer starts life in the IDLE state, awaiting request to render notifications.
audioPipelineFactory | The ApplicationAudioPlayerInterface instance to use to create the notifications media player for rendering audio. |
audioFocusManager | The annotated FocusManager instance to use to request audio focus. |
shutdownNotifier | The object to register with to receive notification when it is time to shutdown. |
|
overridevirtual |
Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.
Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.
|
override |
|
overridevirtual |
Used to notify the observer of the Channel of focus changes. Once called, the client should make a user observable change only and return immediately. Any additional work that needs to be done should be done on a separate thread or after returning. "User observable change" here refers to events that the end user of the product can visibly see or hear. For example, Alexa speech or music playing would be examples of user observable changes. Other work, such as database storing, logging, or communicating via network should be done on a different thread. Not doing so could result in delays for other clients trying to access the Channel.
newFocus | The new Focus of the channel. |
behavior | The mixingBehavior for the ChannelObserver to take as per the interrupt model |
Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelObserverInterface.
|
override |
|
override |
|
override |
|
override |
|
override |
|
overridevirtual |
Render (play) a notification audio clip. If the asset at the specified url cannot be played for some reason, the default notification audio clip should be played, instead. If renderNotification is called while another rendering operation is in progress, this method fails and returns false.
audioFactory | A function that produces a pair of audio stream and media type char to play if the audio specified by url can not be played. |
url | URL of the preferred audio asset to play. |
Implements alexaClientSDK::acsdkNotificationsInterfaces::NotificationRendererInterface.
|
friend |
Friend relationship to allow accessing State to convert it to a string for logging.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0