我遵循Flutter flutter_youtube 1.1.1的示例,但是它只能单击按钮并以youtube视频开始页面。我可以知道如何将YouTube视频放入容器或盒子中吗?
void playYoutubeVideoEdit() {
var youtube = new FlutterYoutube();
youtube.onVideoEnded.listen((onData) {
//perform your action when video playing is done
});
FlutterYoutube.playYoutubeVideoByUrl(
apiKey: "fdsfsgfdsgf-Fp_KPafdsfdgfdgfdssdfsWVHCoiWCVwh8",
videoUrl: "https://www.youtube.com/watch?v=D5jK8W4wlu8",
autoPlay: true,
fullScreen: false
);
}