Giter Site home page Giter Site logo

pause is not working about pod_player HOT 9 OPEN

1041harpreet avatar 1041harpreet commented on June 3, 2024 3
pause is not working

from pod_player.

Comments (9)

adoniasdantas avatar adoniasdantas commented on June 3, 2024 1

As Github removed the private message feature, I've added you on LinkedIn

from pod_player.

Purehi avatar Purehi commented on June 3, 2024 1

How to solve it?@newtaDev

from pod_player.

newtaDev avatar newtaDev commented on June 3, 2024

Can you add reproducible steps

from pod_player.

1041harpreet avatar 1041harpreet commented on June 3, 2024

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!,
                      )

from pod_player.

1041harpreet avatar 1041harpreet commented on June 3, 2024

@newtaDev please solve this issue, video pause is working after clicking pause button 2 3 times .

from pod_player.

adoniasdantas avatar adoniasdantas commented on June 3, 2024

Hi @1041harpreet, could you solve this?
I have the same issue. Coincidence or not I'm also implementing a miniplayer like you

from pod_player.

1041harpreet avatar 1041harpreet commented on June 3, 2024

@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,

from pod_player.

adoniasdantas avatar adoniasdantas commented on June 3, 2024

@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

from pod_player.

1041harpreet avatar 1041harpreet commented on June 3, 2024

@adoniasdantas yes , i can share you mine code. message me in personal.

from pod_player.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.