Skip to content

Commit d6d8abd

Browse files
committed
feat: video_player web options
1 parent 0e42c04 commit d6d8abd

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

packages/video_player/video_player/lib/video_player.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import 'package:video_player_platform_interface/video_player_platform_interface.
1414
import 'src/closed_caption_file.dart';
1515

1616
export 'package:video_player_platform_interface/video_player_platform_interface.dart'
17-
show DurationRange, DataSourceType, VideoFormat, VideoPlayerOptions;
17+
show
18+
DurationRange,
19+
DataSourceType,
20+
VideoFormat,
21+
VideoPlayerOptions,
22+
VideoPlayerWebOptions;
1823

1924
export 'src/closed_caption_file.dart';
2025

@@ -440,6 +445,13 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
440445
_creatingCompleter!.complete(null);
441446
final Completer<void> initializingCompleter = Completer<void>();
442447

448+
if (videoPlayerOptions?.webOptions != null) {
449+
await _videoPlayerPlatform.setWebOptions(
450+
_textureId,
451+
videoPlayerOptions!.webOptions!,
452+
);
453+
}
454+
443455
void eventListener(VideoEvent event) {
444456
if (_isDisposed) {
445457
return;

0 commit comments

Comments
 (0)