LiveSubtitle class

Live subtitle data for displaying real-time captions on video cards. Used when translation transcript is received and subtitles are enabled.

Constructors

LiveSubtitle({required String text, required String language, required DateTime timestamp, required DateTime expiresAt, required String speakerId, required String speakerName})
LiveSubtitle.create({required String text, required String language, required String speakerId, required String speakerName})
Create a new subtitle with auto-calculated expiration Duration is based on text length: min 3 seconds, +50ms per character, max 8 seconds
factory

Properties

expiresAt DateTime
When this subtitle should auto-hide (typically 3-5 seconds after creation)
final
hashCode int
The hash code for this object.
no setterinherited
isExpired bool
Check if this subtitle has expired
no setter
language String
The language code of the text
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speakerId String
The speaker's ID who spoke this text
final
speakerName String
The speaker's display name
final
text String
The translated or original text to display
final
timestamp DateTime
When this subtitle was created
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited