Hello so I've been trying to get videos to play from my api to my flutter app but it keep crashing when the video screen comes up , the whole application and the emulator both crash when the video screen comes up. here are some of the errors that i get :
W/Gralloc4( 4415): allocator 3.x is not supported
D/CCodec ( 4415): allocate(c2.android.aac.decoder)
D/CCodec ( 4415): allocate(c2.android.aac.decoder)
I/Codec2Client( 4415): Available Codec2 services: "software"
Lost connection to device.
I mostly followed the documentation and I can't seem to figure out what's causing the problem. Here i'm gonna attach the flutter code :
class DetailScreen extends StatefulWidget {
final SlideItem movie;
DetailScreen({ Key key, this.movie}) : super(key: key);
@override
DetailScreenState createState() => DetailScreenState();
}
class DetailScreenState extends State<DetailScreen> {
VideoPlayerController controller;
ChewieController chewieController;
@override
void initState()
{
super.initState();
controller = VideoPlayerController.network(
"https://mobileticketing.herokuapp.com/"+super.widget.movie.trailer);
controller.initialize();
chewieController = ChewieController(
videoPlayerController: controller,
aspectRatio: 16/9,
autoInitialize: true,
looping: true
);
}
@override
void dispose()
{
controller.dispose();
chewieController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0.0,
title: Text(super.widget.movie.title),
centerTitle: true,
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
children: <Widget>[
Chewie(controller: chewieController),
],
),
),
);
}
}