'YouTube video player in flutter
I'm using this package youtube_player_flutter: ^8.0.0 to display YouTube videos in my flutter application but I have a little of issues that I can't solve yet.
firstly, How can hide the YouTube video name and channel photo, and YouTube logo from my video?
secondly, how can hide YouTube recommendation videos at the end of my video?
finally, is there a way to prevent users to rewatch this video?
this my code
YoutubePlayer(
controller: YoutubePlayerController(
initialVideoId: YoutubePlayer.convertUrlToId(widget.initialUrl).toString(),
flags: const YoutubePlayerFlags(
hideThumbnail: true,
autoPlay: false,
mute: false,
),
),
),
my dispose code
@override
void dispose() {
super.dispose();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]);
videoPlayerController.dispose();
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|