Code Monkey home page Code Monkey logo

Comments (3)

JarvanMo avatar JarvanMo commented on May 28, 2024

The problem seems to be that something wrong when changing videoPlayer. Actually video_player work with native players. And as a result, we can't release players as soon as possible and at that time the ChangeNotifier was disposed or null. I think this is the problem and I'm trying to solve this.

from neeko.

atjosue avatar atjosue commented on May 28, 2024

Hello, I am having the same problem, I would like to know if it has been solved?
analyzing the issue, I see that the problem may be the progress bar of the duration of the video, I see that the error occurs at the moment that a stream file (.m3u8) ends and a new one begins, because that's when the progressbar cannot find the start and end parameters of the video; which does not happen when the file extension is mp4 and the option "isLive = true" is left because it only happens at the beginning of the video and then it is corrected. I guess a solution would be to disable or set the ProgressBar fixed cause its a LiveStream and such animation is not necessary, I hope that my opinion has been understood, I will be waiting for an answer because this package is important for my project. Thank you.

from neeko.

atjosue avatar atjosue commented on May 28, 2024

just change the "_attachListenerToController()" function located in the video_controller_widgets.dart() file to the following code:

_attachListenerToController() {
if(controller!=null){
controller.addListener(
() {
if (controller.value.duration == null ||
controller.value.position == null) {
return;
}
if (mounted) {
setState(() {
_currentPosition = controller.value.position.inMilliseconds;
_currentSliderPosition = controller.value.position.inMilliseconds /
controller.value.duration.inMilliseconds;
});
}
},
);
}
}

If the problem persists, just delete the slider located in the widget's constructor.
You also have to set the "Loop = true" and "autoPlay=false".

from neeko.

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.