@@ -401,15 +401,36 @@ class VideoPlayerOptions {
401
401
class VideoPlayerWebOptions {
402
402
/// [VideoPlayerWebOptions] can be optionally used to set additional web settings
403
403
const VideoPlayerWebOptions ({
404
- this .controlsEnabled = false ,
404
+ this .controls = const VideoPlayerWebOptionsControls .disabled (),
405
+ this .allowContextMenu = true ,
406
+ });
407
+
408
+ /// Additional settings how control options are displayed
409
+ final VideoPlayerWebOptionsControls controls;
410
+
411
+ /// Whether context menu (right click) is allowed
412
+ final bool allowContextMenu;
413
+ }
414
+
415
+ /// [VideoPlayerWebOptions] can used to set how control options are displayed
416
+ @immutable
417
+ class VideoPlayerWebOptionsControls {
418
+ /// Enabled controls and set how the options are displayed
419
+ const VideoPlayerWebOptionsControls .enabled ({
405
420
this .allowDownload = true ,
406
421
this .allowFullscreen = true ,
407
422
this .allowPlaybackRate = true ,
408
- this .allowContextMenu = true ,
409
- });
423
+ }) : enabled = true ;
424
+
425
+ /// Disables control options. Default behavior.
426
+ const VideoPlayerWebOptionsControls .disabled ()
427
+ : enabled = false ,
428
+ allowDownload = false ,
429
+ allowFullscreen = false ,
430
+ allowPlaybackRate = false ;
410
431
411
432
/// Whether native controls are enabled
412
- final bool controlsEnabled ;
433
+ final bool enabled ;
413
434
414
435
/// Whether downloaded control is displayed
415
436
///
@@ -426,9 +447,6 @@ class VideoPlayerWebOptions {
426
447
/// Only applicable when [controlsEnabled] is true
427
448
final bool allowPlaybackRate;
428
449
429
- /// Whether context menu (right click) is allowed
430
- final bool allowContextMenu;
431
-
432
450
/// A string representation of disallowed controls
433
451
String get controlsList {
434
452
final List <String > controlsList = < String > [];
0 commit comments