AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::captions::CaptionManagerInterface Class Referenceabstract

#include <CaptionManagerInterface.h>

Inheritance diagram for alexaClientSDK::captions::CaptionManagerInterface:
Inheritance graph
[legend]

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~CaptionManagerInterface()

virtual alexaClientSDK::captions::CaptionManagerInterface::~CaptionManagerInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addMediaPlayer()

virtual void alexaClientSDK::captions::CaptionManagerInterface::addMediaPlayer ( const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &  mediaPlayer)
pure virtual

Adds a MediaPlayerInterface instance responsible for producing caption content. This media player will be appended to the list of active media players.

Parameters
mediaPlayerThe media player which should be observed for media state changes.

Implemented in alexaClientSDK::captions::CaptionManager.

◆ isEnabled()

virtual bool alexaClientSDK::captions::CaptionManagerInterface::isEnabled ( ) const
pure virtual

Whether captions are enabled. Capability Agents may skip unnecessary processing if captions are disabled.

Returns
Whether captions is enabled.

Implemented in alexaClientSDK::captions::CaptionManager.

◆ onCaption()

virtual void alexaClientSDK::captions::CaptionManagerInterface::onCaption ( CaptionFrame::MediaPlayerSourceId  sourceId,
const CaptionData captionData 
)
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.

Parameters
sourceIdThe ID of the media source for this caption.
captionDataThe object containing the raw caption content and metadata.

Implemented in alexaClientSDK::captions::CaptionManager.

◆ removeMediaPlayer()

virtual void alexaClientSDK::captions::CaptionManagerInterface::removeMediaPlayer ( const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &  mediaPlayer)
pure virtual

Removes the MediaPlayerInterface instance from the list of media players responsible for producing caption content. The rest of the list remains unchanged.

Parameters
mediaPlayerThe media player to remove.

Implemented in alexaClientSDK::captions::CaptionManager.

◆ setCaptionPresenter()

virtual void alexaClientSDK::captions::CaptionManagerInterface::setCaptionPresenter ( const std::shared_ptr< CaptionPresenterInterface > &  presenter)
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.

Parameters
presenterThe CaptionPresenterInterface instance to use for caption text measurement and presentation.

Implemented in alexaClientSDK::captions::CaptionManager.

◆ setMediaPlayers()

virtual void alexaClientSDK::captions::CaptionManagerInterface::setMediaPlayers ( const std::vector< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >> &  mediaPlayers)
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.

Parameters
mediaPlayersThe media players which should be observed for media state changes.

Implemented in alexaClientSDK::captions::CaptionManager.


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