chewie icon indicating copy to clipboard operation
chewie copied to clipboard

Controls not visible for videos with white backgrounds.

Open Augustinekan opened this issue 3 years ago • 2 comments

Is there a way to add some tint/ dark color overlay when the controls are in view? Screenshot_2022-09-21-21-16-17-14_9fdafd060cb699d8aeb277552de4a95d Screenshot_2022-09-21-21-16-54-37_9fdafd060cb699d8aeb277552de4a95d

Augustinekan avatar Sep 21 '22 18:09 Augustinekan

that would be a great feature...

aeaevo avatar Jan 21 '23 20:01 aeaevo

An overlay was introduced in chewie 1.2.0, see player_with_controls file at time of update. However even until today the overlay is excluded for iOS.

 if (Theme.of(context).platform != TargetPlatform.iOS)
            Consumer<PlayerNotifier>(
              builder: (
                BuildContext context,
                PlayerNotifier notifier,
                Widget? widget,
              ) =>
                  AnimatedOpacity(
                opacity: notifier.hideStuff ? 0.0 : 0.8,
                duration: const Duration(
                  milliseconds: 250,
                ),
                child: Container(
                  decoration: const BoxDecoration(color: Colors.black54),
                  child: Container(),
                ),
              ),
            ),

Does anyone why? I can circumvent this condition by wrapping Chewie into a Theme with TargetPlatform.android enforced:

Theme(
          data: Theme.of(context).copyWith(platform: TargetPlatform.android),
          child: Chewie(
            controller: _chewieController,
          ),
        ),

But I don't understand why this condition was added in the first place. Youtube on iOS also has a dark control overlay.

flying-wizzy avatar Nov 20 '24 12:11 flying-wizzy