![]()  | 
  
    AlexaClientSDK
    3.0.0
    
   A cross-platform, modular SDK for interacting with the Alexa Voice Service 
   | 
 
#include <CaptionManager.h>


Static Public Member Functions | |
| static std::shared_ptr< CaptionManager > | create (std::shared_ptr< CaptionParserInterface > parser, std::shared_ptr< TimingAdapterFactory > timingAdapterFactory=nullptr) | 
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 | 
This class is the primary mediator between unprocessed captions content, one or more caption parsers, and an implementation of the CaptionPresenterInterface.
This class:
CaptionPresenterInterface when and for how long each CaptionFrame should be shownCaptionManager::onParsed() method should be modified to use a locale-safe method for determining the break points between words. One such method is supplied through ICU's BreakIterator: http://icu-project.org/apiref/icu4c/classicu_1_1BreakIterator.html 
      
  | 
  overridevirtual | 
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. | 
Implements alexaClientSDK::captions::CaptionManagerInterface.
      
  | 
  static | 
Creates a CaptionManager as as an observer of the provided MediaPlayerInterfaces so that playback state of the media players can be kept in sync with the captioned media.
| parser | Parsing implementation to use for parsing captions content. | 
| timingAdapterGenerator | The generator used to produce CaptionTimingAdapterInterface objects on demand.  | 
      
  | 
  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.
      
  | 
  overridevirtual | 
Whether captions are enabled. Capability Agents may skip unnecessary processing if captions are disabled.
Implements alexaClientSDK::captions::CaptionManagerInterface.
      
  | 
  overridevirtual | 
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. | 
Implements alexaClientSDK::captions::CaptionManagerInterface.
      
  | 
  inlineoverridevirtual | 
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 | 
Called by the caption parser implementation for each caption frame that has been parsed.
| captionFrame | The single frame of captions, containing everything needed to be displayed. | 
Implements alexaClientSDK::captions::CaptionFrameParseListenerInterface.
      
  | 
  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 paused playing the source.
MediaPlayer from further processing.| SourceId | The id of the source to which this callback corresponds to. | 
| MediaPlayerState | Metadata about the media player state | 
Reimplemented from alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.
      
  | 
  overridevirtual | 
This is an indication to the observer that the MediaPlayer has resumed playing the source.
MediaPlayer from further processing.| SourceId | The id of the source to which this callback corresponds to. | 
| MediaPlayerState | Metadata about the media player state | 
Reimplemented from 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.| SourceId | The id of the source to which this callback corresponds to. | 
| MediaPlayerState | Metadata about the media player state | 
Reimplemented from alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface.
      
  | 
  overridevirtual | 
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. | 
Implements alexaClientSDK::captions::CaptionManagerInterface.
      
  | 
  overridevirtual | 
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.  | 
Implements alexaClientSDK::captions::CaptionManagerInterface.
      
  | 
  overridevirtual | 
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. | 
Implements alexaClientSDK::captions::CaptionManagerInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0