pause is not working
https://github.com/newtaDev/pod_player/assets/96649743/0bd7ae3f-81ac-452e-91e8-5f0229536a45
Can you add reproducible steps
class VideoPlayerControllerNotifier extends ChangeNotifier { PodPlayerController? _controller;
PodPlayerController? get controller => _controller;
String? videoValue;
setVideoValue(value) { videoValue = value; notifyListeners(); }
init(videourl) { if (_controller == null || videourl != videoValue) { _controller = PodPlayerController( playVideoFrom: PlayVideoFrom.youtube(videourl), podPlayerConfig: const PodPlayerConfig( autoPlay: true, isLooping: false, videoQualityPriority: [1080, 720, 360])) ..initialise().then((value) { _controller!.play(); setVideoValue(videourl); print(videoValue); }).onError((error, stackTrace) { print('error : $error'); }); } }
void stopPlay() { if (_controller != null) { _controller!.pause(); } } }
final videoProvider = ChangeNotifierProvider.autoDispose((ref) { return VideoPlayerControllerNotifier(); }); i am using this stopPlay() in my ui and this is used to control manyally but default video player stop function is also not working. my code for video player is ... in init state i am calling it like this void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
ref.watch(videoProvider).init(widget.videourl);
}); } and this is my video player
PodVideoPlayer(
controller: ref.watch(videoProvider).controller!,
)
@newtaDev please solve this issue, video pause is working after clicking pause button 2 3 times .
Hi @1041harpreet, could you solve this? I have the same issue. Coincidence or not I'm also implementing a miniplayer like you
@adoniasdantas hi, there were other errors while implementing pod player , so i used simple video player and chewie with mini player. for playling youtube videos you can use youtube explode pacakge,
@1041harpreet Thanks for your comment Is it possible to send some sample on how you implemented your mini player like YouTube? i'm trying mini_player but it doesn't work for full screen either
@adoniasdantas yes , i can share you mine code. message me in personal.
As Github removed the private message feature, I've added you on LinkedIn
How to solve it?@newtaDev