Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web - Tap Gesture not working when video is covering below the controls #126

Open
ponnamkarthik opened this issue Jun 28, 2023 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@ponnamkarthik
Copy link

Here is the demo link where we can test it

https://648d83a494a86669f2b9382f--magenta-salamander-282bb4.netlify.app/#/

when i visit VOD page and wait till the video loaded and once the controllers are hidden i cannot bring them back by clicking on the video and also unable to click any controls its not responding

@abdelaziz-mahdy
Copy link
Owner

abdelaziz-mahdy commented Jun 28, 2023

Please provide sample code since the controls work on the package demo, so most probably it's a problem in your code.

Providing the code helps debugging it, and knowing what is causing the problem

@ponnamkarthik
Copy link
Author

ponnamkarthik commented Jun 28, 2023

class VodPlayer extends StatefulWidget {
  const VodPlayer({Key? key}) : super(key: key);

  @override
  State<VodPlayer> createState() => _VodPlayerState();
}

class _VodPlayerState extends State<VodPlayer> {

  final _meeduPlayerController = MeeduPlayerController(
    controlsStyle: ControlsStyle.primary,
    controlsEnabled: true,
    enabledControls: EnabledControls(),

    enabledOverlays: const EnabledOverlays(),
      enabledButtons: const EnabledButtons(
      ),
  );

  @override
  void initState() {
    super.initState();
    Wakelock.enable();
    WidgetsBinding.instance!.addPostFrameCallback((_) {
      _init();
    });

  }

  @override
  void dispose() {
    Wakelock.disable();
    _meeduPlayerController.dispose();// release the video player
    super.dispose();
  }

  _init() {
    _meeduPlayerController.setDataSource(
      DataSource(
        type: DataSourceType.network,
        source: "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
      ),
      autoplay: true,
    );
  }

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
        appBar: AppBar(
          title: Text("VOD Player",style: TextStyle(color: Colors.black,fontWeight: FontWeight.w700,fontSize: 14),),
        ),
        body: SingleChildScrollView(
          child: Column(
            children: [
              AspectRatio(
                aspectRatio: 16 / 9,
                child: MeeduVideoPlayer(
                  controller: _meeduPlayerController,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

here is the code for the player i used

there are some cases where only play and pause works remaining all buttons are not clickable even if we click on any of those button it just play/pause

@abdelaziz-mahdy
Copy link
Owner

Does the mobile app work correctly?

@ponnamkarthik
Copy link
Author

ponnamkarthik commented Jun 28, 2023

Works perfectly on mobile issue is on web

@abdelaziz-mahdy
Copy link
Owner

Works perfectly on mobile issue is on web

Well that's weird, can it be a problem with flutter itself? I don't see a problem with your code

@abdelaziz-mahdy abdelaziz-mahdy added the help wanted Extra attention is needed label Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants