toFlutterTextTrackType function

TextTrackType toFlutterTextTrackType(
  1. String textTrackType
)

Implementation

PlatformInterface.TextTrackType toFlutterTextTrackType(String textTrackType) {
  switch (textTrackType) {
    case "srt":
      return PlatformInterface.TextTrackType.srt;
    case "ttml":
      return PlatformInterface.TextTrackType.ttml;
    case "webvtt":
      return PlatformInterface.TextTrackType.webvtt;
    case "emsg":
      return PlatformInterface.TextTrackType.emsg;
    case "eventstream":
      return PlatformInterface.TextTrackType.eventstream;
    case "id3":
      return PlatformInterface.TextTrackType.id3;
    case "cea608":
      return PlatformInterface.TextTrackType.cea608;
    case "daterange":
      return PlatformInterface.TextTrackType.daterange;
    case "":
    default:
      return PlatformInterface.TextTrackType.none;
  }
}