Skip to content

Commit

Permalink
video: fixed disabling subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
deckerst committed Aug 20, 2023
1 parent 0fc2710 commit b34487f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/widgets/dialogs/video_stream_selection_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ class _VideoStreamSelectionDialogState extends State<VideoStreamSelectionDialog>
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: TextDropdownButton<MediaStreamSummary>(
values: streams.whereNotNull().toList(),
// allow `null` subtitle stream to disable subtitles
child: TextDropdownButton<MediaStreamSummary?>(
values: streams,
valueText: _streamName,
value: current,
onChanged: streams.length > 1 ? (newValue) => setState(() => setter(newValue)) : null,
Expand Down

0 comments on commit b34487f

Please sign in to comment.