SubtitleTrack.data constructor

SubtitleTrack.data(
  1. String data, {
  2. String? title,
  3. String? language,
})

SubtitleTrack loaded with data.

This factory constructor may be used to load external subtitles e.g. SRT, WebVTT etc. as data.

NOTE: External audio track is automatically unloaded upon playback completion.

Implementation

factory SubtitleTrack.data(
  String data, {
  String? title,
  String? language,
}) =>
    SubtitleTrack(data, title, language, false, true);