From 1c7e5d7e63b6f8a883c6d2f10cab491b7a67e5fb Mon Sep 17 00:00:00 2001 From: Ortes Date: Tue, 1 Apr 2025 20:36:54 -0400 Subject: [PATCH] Add documentation about pauseOnBackgroundTap feature --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 72884a3be..9b744d2b5 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,21 @@ optionsBuilder: (context, defaultOptions) async { Your `additionalOptions` are already included here (if you provided `additionalOptions`)! +### `pauseOnBackgroundTap` (Tap Anywhere to Pause/Play) + +The `pauseOnBackgroundTap` feature allows the video to be paused or played by tapping anywhere on the video player area. +This eliminates the need for users to tap the play/pause icon in the center of the video. + +This feature can be enabled by setting the `pauseOnBackgroundTap` property in the ChewieController. +When enabled, tapping anywhere on the video will toggle between play and pause states. + +```dart +final chewieController = ChewieController( + videoPlayerController: videoPlayerController, + pauseOnBackgroundTap: true, // Allow tapping anywhere on the video to pause/play +); +``` + ### Translations What is an option without proper translation?