custom_youtube_player_flutter 9.0.10

SDKflutter
Platformandroidioswindowsmacosweb

Flutter plugin for playing or streaming inline YouTube videos using the official iFrame player API. This plugin supports both Android and iOS.

Youtube Player for Flutter Example

Detailed Example

YoutubePlayerController _controller;

@override
void initState(){
    _controller = YoutubePlayerController(
        initialVideoId: 'iLnmTe5Q2Qw',
        flags: YoutubePlayerFlags(
            mute: false,
            autoPlay: true,
        ),
    );
    super.initState();
}

@override
Widget build(BuildContext context){
    return YoutubePlayer(
       controller: _controller,
       showVideoProgressIndicator: true,
       videoProgressIndicatorColor: Colors.amber,
       progressColors: ProgressColors(
          playedColor: Colors.amber,
          handleColor: Colors.amberAccent,
       ),
       onReady: () {
          print('Player is ready.');
       },
    );
}