AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <CaptionFrame.h>
Public Types | |
using | MediaPlayerSourceId = avsCommon::utils::mediaPlayer::MediaPlayerInterface::SourceId |
Type alias to the media player source ID. More... | |
Public Member Functions | |
CaptionFrame (MediaPlayerSourceId sourceId=0, std::chrono::milliseconds duration=std::chrono::milliseconds(0), std::chrono::milliseconds delay=std::chrono::milliseconds(0), const std::vector< CaptionLine > &captionLines={}) | |
std::chrono::milliseconds | getDuration () const |
std::chrono::milliseconds | getDelay () const |
MediaPlayerSourceId | getSourceId () const |
std::vector< CaptionLine > | getCaptionLines () const |
bool | operator== (const CaptionFrame &rhs) const |
bool | operator!= (const CaptionFrame &rhs) const |
Static Public Member Functions | |
static int | getLineWrapLimit () |
A container to represent a single frame of captions, with all the metadata needed to format and display the text.
using alexaClientSDK::captions::CaptionFrame::MediaPlayerSourceId = avsCommon::utils::mediaPlayer::MediaPlayerInterface::SourceId |
Type alias to the media player source ID.
alexaClientSDK::captions::CaptionFrame::CaptionFrame | ( | MediaPlayerSourceId | sourceId = 0 , |
std::chrono::milliseconds | duration = std::chrono::milliseconds(0) , |
||
std::chrono::milliseconds | delay = std::chrono::milliseconds(0) , |
||
const std::vector< CaptionLine > & | captionLines = {} |
||
) |
Constructor
sourceId | The media player source ID. CaptionFrames from the same media source share the same ID. |
duration | A number in milliseconds to determine how long the caption should be displayed on the screen. |
delay | The amount of time that should pass before this frame is shown on the screen. |
captionTextLines | One or more CaptionLine objects. |
std::vector<CaptionLine> alexaClientSDK::captions::CaptionFrame::getCaptionLines | ( | ) | const |
Getter for the caption text, consisting of one or more pairs of strings of text with the styles present for that text. Each pair represents one styled line of caption text.
CaptionLine
objects, each representing one styled line of caption text. std::chrono::milliseconds alexaClientSDK::captions::CaptionFrame::getDelay | ( | ) | const |
The amount of time that should pass before this frame is shown on the screen.
std::chrono::milliseconds alexaClientSDK::captions::CaptionFrame::getDuration | ( | ) | const |
How long the caption text should be displayed on the screen.
|
static |
Get the maximum number of acceptable line wraps that can occur for a single CaptionFrame
. This is useful as a guard value to prevent accidental infinite loops when calculating line wraps.
MediaPlayerSourceId alexaClientSDK::captions::CaptionFrame::getSourceId | ( | ) | const |
Getter to return the source ID for this caption content.
bool alexaClientSDK::captions::CaptionFrame::operator!= | ( | const CaptionFrame & | rhs | ) | const |
Operator != for CaptionFrame
.
rhs | The right hand side of the != operation. |
rhs
are not equivalent. bool alexaClientSDK::captions::CaptionFrame::operator== | ( | const CaptionFrame & | rhs | ) | const |
Operator == for CaptionFrame
.
rhs | The right hand side of the == operation. |
rhs
are equivalent. AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0