youtube_video_webview 1.0.2 copy "youtube_video_webview: ^1.0.2" to clipboard
youtube_video_webview: ^1.0.2 copied to clipboard

A customizable YouTube video player for Flutter, supporting embedded playback, fullscreen mode, sharing, captions, and seamless redirection to YouTube inside a webview.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:youtube_video_webview/youtube_video_webview.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Youtube Video Webview Example')),
        body: SafeArea(
          maintainBottomViewPadding: true,
          child: Center(
            child: YoutubeVideoWebview(
              videoId: 'LoheCz4t2xc',
              referrerHeader: 'https://www.google.com',
              externalBrowserSettings: YoutubePageWebViewSettings(
                // dragToDismiss: true
                // appBar: YoutubeVideoWebviewAppBarDefault(),
                appBar: YoutubeVideoWebviewAppBarShare(videoId: 'jqKtxmf8x7A', shareText: "Check out this video!"),
                // appBar: YoutubeVideoWebviewAppBarCustom(appBar: AppBar(
                //   title: const Text('Custom App Bar'),
                //   backgroundColor: Colors.green,
                // ),),
              ),
            ), // your widget here
          ),
        ),
      ),
    );
  }
}
0
likes
0
points
207
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable YouTube video player for Flutter, supporting embedded playback, fullscreen mode, sharing, captions, and seamless redirection to YouTube inside a webview.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, share_plus, webview_flutter

More

Packages that depend on youtube_video_webview