setCaptionsLanguages method

void setCaptionsLanguages(
  1. {required MediaItem item,
  2. required List<String> captionsLanguages,
  3. required bool autoGenerated}
)

Persists a video's caption languages.

Implementation

void setCaptionsLanguages({
  required MediaItem item,
  required List<String> captionsLanguages,
  required bool autoGenerated,
}) {
  setPreference<List<String>?>(
    key: 'captions/$autoGenerated/${item.mediaIdentifier}',
    value: captionsLanguages,
  );
}