removeSubtitle method
Implementation
List<Subtitle> removeSubtitle(int trackIndex) {
// 获取待删除的字幕
final toBeRemoved =
subtitles.where((subtitle) => subtitle.index == trackIndex).toList();
// 删除符合条件的字幕
subtitles.removeWhere((subtitle) => subtitle.index == trackIndex);
// 返回被删除的字幕列表
return toBeRemoved;
}