Comments (10)
Thanks! This is a bit of a tricky one, but I think I know where the bug is. I'll try to push up a fix for it over the weekend :)
from chewie.
Yeah i just face this problem. Used chewie with hero animation then got same problem here. Plz take a look for my problem.
body: new ListView(
children: <Widget>[
new Padding(padding: new EdgeInsets.only(top: 1.0)),
new Hero(
tag: 'hero1',
child: new Container(
child: new Chewie(
_videoController,
aspectRatio: 16/9,
autoPlay: false,
autoInitialize: false,
showControls: true,
),
)
)
],
),
A VideoPlayerController was used after being disposed.
I/flutter ( 6474): Once you have called dispose() on a VideoPlayerController, it can no longer be used.
Thanks you
from chewie.
Hi. I changed code to
new Hero(
tag: 'hero$heroId',
child: new Material(
child: new AspectRatio(
aspectRatio: 16 / 9,
child: new VideoPlayer(_videoController),
)
),
)
then no problem. Only red screen when using chewie. Plz fix that
from chewie.
@brianegan could this ve related to "didUpdateWidget" disposing the controller? (the hero issue)
https://github.com/brianegan/chewie/blob/master/lib/src/chewie_player.dart#L147
from chewie.
Can't reproduce this issue in Chewie
0.9.0. If the issue should persist after updating to 0.9.0, please comment and I will reopen the issue.
from chewie.
Hello,
I have tried to implement this inside my Listview widget and I have tried version 0.9.0 as well in 0.9.4 but I got the same issue(Black screen). In my code I just initialize video and i don't want to play it but on click of that I am opening another view and inside that, I play the video.
This is a snippet of my code:
VideoPlayerController _videoPlayerController = VideoPlayerController.network(mediaModel.path); final _chewieController = ChewieController( videoPlayerController: _videoPlayerController, autoPlay: false, looping: false, aspectRatio: 1, showControls: false, autoInitialize: true, overlay: Center( child: InkWell( onTap: () { goToMediaFullScreen(context, mediaModel); }, child: Icon( Icons.play_circle_outline, color: Colors.grey, size: 50, ), ), ));
mediaChildWidget.add(Chewie( controller: _chewieController, ));
Please help.
from chewie.
Any new on this? I get a lot of
"Another exception was thrown: A ChewieController was used after being disposed."
when I try to play a video from a gridview click...
from chewie.
I am having this issue using version ^0.9.8+1. Can this be reopened?
void initState() {
super.initState();
_chewieController = ChewieController(
videoPlayerController: widget.videoPlayerController,
aspectRatio: 3/4,
autoInitialize: true,
looping: widget.looping,
errorBuilder: (context, errorMessage) {
return Center(
child: Text(
errorMessage,
style: TextStyle(color: Colors.white),
),
);
},
);
}
from chewie.
This link solved my issue - I needed to move a super.dispose() line to after the chewie.dispose() in my override void dispose area.
#170
from chewie.
I set the auto dispose parameter to false and dispose it when ever I am off the page... Use same video player controller and update the datasource with setDataSource... set autoplay to false and Add a listener to player controller with BetterPlayerEvents I manage Auto Play and things... One thing that bug me now is If I play video some times video doesn't initialize and throws a playback error only on iOS... And suggestion how to fix this...
Unhandled Exception: PlatformException(VideoError, Failed to load video: Cannot Complete Action, null, null)
from chewie.
Related Issues (20)
- Chewie customControls aren't responsive so they became too small on tablets
- HLS (.m3u8) format video from file not playing on iOS devices HOT 2
- Show Progress Bar Only on Full Screen HOT 1
- On Backbutton pressed it exit the app
- Seeking video using progress bar is not smooth
- Option to customize the overlay colour during hover.
- How do you hide all the buttons/icons/progressBar?
- MaterialVideoProgressBar height issue HOT 1
- Performance degredating past 1.6.0+1
- Pip issue in Chewei Player and adding ads like youtube
- 'video/avc' not play HOT 1
- Unable to play local video in macOS
- Plugin does not support cache HOT 1
- How to disable wakelock on IOS side? HOT 1
- i need to change Chewie video player for flutter take up the whole screen size regardless of video dimensions?
- Zoom not working in fullscreen HOT 2
- Bug: App Orientation Does Not Return to Portrait on Exiting Full Screen Mode
- Chewie Video Player Stuck On Loading Forever
- How to play from beginning?
- Videos very rarely playing on Firefox on Android phone
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chewie.