flutter_youtube_view

This plugin provides YoutubeView widget.

Supported

Status Develop

  • Android: DONE
  • iOS: DONE

How to Use

1. Depend

Add this to you package's pubspec.yaml file:

dependencies:
  flutter_youtube_view: ^1.1.0

2. Install

Run command:

$ flutter packages get

3. Import

Import in Dart code:

import 'package:flutter_youtube_view/flutter_youtube_view.dart';

4. Using Youtube View

 Container(
          child: FlutterYoutubeView(
                onViewCreated: _onYoutubeCreated,
                listener: this,
                params: YoutubeParam(
                      videoId: 'gcj2RUWQZ60', 
                      showUI: false, 
                      startSeconds: 0.0),
                )
            ),

Salient Features

  • play()
  • pause()
  • loadOrCueVideo()
  • seekTo()
  • setVolume()
  • Player listener
  • State: UNKNOWN, UNSTARTED, ENDED, PLAYING, PAUSED, BUFFERING, VIDEO_CUED
  • Status: ready, error
  • Duration
  • CurrentTime

Libraries

flutter_youtube_view