SubtitleTrack class

Represents a subtitle track.

Inheritance
Annotations

Constructors

SubtitleTrack({required String id, required String label, String? url, String? format, bool isDefault = false, bool isForced = false, String? language, List<MediaTrackRole> roles = const []})
const
SubtitleTrack.fromJson(Map<String, dynamic> json)
factory
SubtitleTrack.off()
factory

Properties

format String?
Specifies the file format of this SubtitleTrack. Common values for each platform are defined in SubtitleFormats.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The unique identifier for this SubtitleTrack.
final
isDefault bool
Specifies whether the SubtitleTrack is a default track. Default value is false.
final
isForced bool
Tells if a SubtitleTrack is forced. If set to true it means that the player should automatically select and switch this subtitle according to the selected audio language. Forced subtitles do not appear in Player.availableSubtitles. Default value is false.
final
label String
The label for this SubtitleTrack.
final
language String?
The IETF BCP 47 language tag associated with the SubtitleTrack.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
roles List<MediaTrackRole>
Specifies all the DASH roles that are associated with the SubtitleTrack. This is only supported on Android.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
url String?
The URL of the SubtitleTrack.
final

Methods

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

Operators

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