#include <NotificationRendererInterface.h>
Interface to an object that handles rendering notification audio clips.
◆ ~NotificationRendererInterface()
virtual alexaClientSDK::acsdkNotificationsInterfaces::NotificationRendererInterface::~NotificationRendererInterface |
( |
| ) |
|
|
virtualdefault |
◆ addObserver()
Add an observer to receive a notifications about rendering notification audio clips.
- Parameters
-
observer | The observer to call back. |
◆ cancelNotificationRendering()
virtual bool alexaClientSDK::acsdkNotificationsInterfaces::NotificationRendererInterface::cancelNotificationRendering |
( |
| ) |
|
|
pure virtual |
◆ removeObserver()
Remove an observer from the set of observers to receive a notifications about rendering notification audio clips.
- Parameters
-
observer | The observer to call back. |
◆ renderNotification()
virtual bool alexaClientSDK::acsdkNotificationsInterfaces::NotificationRendererInterface::renderNotification |
( |
std::function< std::pair< std::unique_ptr< std::istream >, const avsCommon::utils::MediaType >()> |
audioFactory, |
|
|
const std::string & |
url |
|
) |
| |
|
pure virtual |
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.
- Note
- : Calling this method from a NotificationRendererObserverInterface callback will lead to a deadlock.
- Parameters
-
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. |
- Returns
- Whether rendering the notification was initiated.
Implemented in alexaClientSDK::acsdkNotifications::NotificationRenderer.
The documentation for this class was generated from the following file:
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0