Open ponnamkarthik opened 1 year ago
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
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
Does the mobile app work correctly?
Works perfectly on mobile issue is on web
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
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