getSubtitleDataSource method

List<PlayerKidSubtitlesSource> getSubtitleDataSource(
  1. List<PlayerSubtitleResource>? listSubtitleVideo
)

Implementation

List<PlayerKidSubtitlesSource> getSubtitleDataSource(
    List<PlayerSubtitleResource>? listSubtitleVideo) {
  List<PlayerKidSubtitlesSource> listSubtitle = [];
  listSubtitleVideo?.forEach((element) {
    listSubtitle.add(PlayerKidSubtitlesSource(
        type: PlayerKidSubtitlesSourceType.network,
        name: element.language,
        urls: [element.subtitleUrl],
        selectedByDefault: false));
  });
  return listSubtitle;
}