guyaristide / youtuyer

Flutter youtube player plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

youtuyer

🙏 Highly inspired by flutter_youtube_view 🙏

This plugin provide a Youtube player for Android and iOS. We've encoutered problems using other flutter plugins : iOS integration doesn't work or take long time to load before playing videos.

This plugin using:

Usage

  • Add to your pubspec.yaml file:
youtuyer:
    git:
      url: git://github.com/guyaristide/youtuyer.git
  • Import in dart code
import 'package:youtuyer/youtuyer.dart';

Currently apps need to opt-in for the UIViews embedding preview on iOS by adding a boolean property to the Info.plist (key=io.flutter.embedded_views_preview value=YES).

  • Using Youtuyer
Container(
    child: YoutuyerWidget(
          onViewCreated: _onYoutubeCreated,
          listener: this,
          params: YoutubeParam(
              videoId: 'gcj2RUWQZ60', showUI: true, startSeconds: 5 * 60.0),
    ),
)

Features

Calls during playback

  • play()
  • pause()
  • loadOrCueVideo()
  • seekTo()
  • setVolume() only Android
  • mute()
  • unMute()

PLAYER callback

  void onReady();

  void onStateChange(String state);

  void onError(String error);

  void onVideoDuration(double duration);

  void onCurrentSecond(double second);

About

Flutter youtube player plugin

License:Other


Languages

Language:Kotlin 46.0%Language:Dart 22.8%Language:Swift 22.2%Language:Ruby 8.1%Language:Objective-C 1.0%