AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <CaptionManagerInterface.h>
Public Member Functions | |
virtual | ~CaptionManagerInterface ()=default |
virtual void | onCaption (CaptionFrame::MediaPlayerSourceId sourceId, const CaptionData &captionData)=0 |
virtual void | setCaptionPresenter (const std::shared_ptr< CaptionPresenterInterface > &presenter)=0 |
virtual void | setMediaPlayers (const std::vector< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >> &mediaPlayers)=0 |
virtual void | addMediaPlayer (const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &mediaPlayer)=0 |
virtual void | removeMediaPlayer (const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &mediaPlayer)=0 |
virtual bool | isEnabled () const =0 |
An interface to allow handling of CaptionData
objects and route them to a CaptionPresenterInterface
instance. Implementations of this interface must be capable of receiving captions from multiple media sources in parallel.
|
virtualdefault |
Destructor.
|
pure virtual |
Adds a MediaPlayerInterface
instance responsible for producing caption content. This media player will be appended to the list of active media players.
mediaPlayer | The media player which should be observed for media state changes. |
Implemented in alexaClientSDK::captions::CaptionManager.
|
pure virtual |
Whether captions are enabled. Capability Agents may skip unnecessary processing if captions are disabled.
Implemented in alexaClientSDK::captions::CaptionManager.
|
pure virtual |
Starts processing the provided CaptionData
with the available parser. If no parser is present, then a warning will be logged to the console, and the CaptionData
object will be ignored.
sourceId | The ID of the media source for this caption. |
captionData | The object containing the raw caption content and metadata. |
Implemented in alexaClientSDK::captions::CaptionManager.
|
pure virtual |
Removes the MediaPlayerInterface
instance from the list of media players responsible for producing caption content. The rest of the list remains unchanged.
mediaPlayer | The media player to remove. |
Implemented in alexaClientSDK::captions::CaptionManager.
|
pure virtual |
Sets the CaptionPresenterInterface
instance responsible for measuring styled caption text and displaying or hiding the captions. If called multiple times, the last CaptionPresenterInterface
set will be the active presenter.
presenter | The CaptionPresenterInterface instance to use for caption text measurement and presentation. |
Implemented in alexaClientSDK::captions::CaptionManager.
|
pure virtual |
Sets the MediaPlayerInterface
instances responsible for producing caption content. If called multiple times, the last vector of MediaPlayerInterface
set will be the active media players.
mediaPlayers | The media players which should be observed for media state changes. |
Implemented in alexaClientSDK::captions::CaptionManager.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0