youtube_web_player 0.1.1 copy "youtube_web_player: ^0.1.1" to clipboard
youtube_web_player: ^0.1.1 copied to clipboard

A Flutter package for seamless integration of YouTube videos in a native WebView, providing a smooth playback experience. Ideal for multimedia applications.

example/lib/main.dart

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

import 'example_list.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        useMaterial3: true,
      ),
      routes: {
        '/': (context) => Scaffold(
          appBar: AppBar(
            title: const Text('youtube_web_player Demo'),
          ),
          body: Center(
            child: Column(
              children: [
                SizedBox(
                  height: MediaQuery.of(context).size.height * 0.3,
                  child: YoutubeWebPlayer(
                    videoId: 'NsJLhRGPv-M',
                    isIframeAllowFullscreen: true,
                    isAllowsInlineMediaPlayback: false,
                  ),
                ),
                TextButton(onPressed: () => Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => ExampleList(),
                  ),
                ), child: Text("Example 2"))
              ],
            ),
          ),
        ),
      },
    );
  }
}
13
likes
0
points
102
downloads

Publisher

verified publisherrony.fun

Weekly Downloads

A Flutter package for seamless integration of YouTube videos in a native WebView, providing a smooth playback experience. Ideal for multimedia applications.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_inappwebview

More

Packages that depend on youtube_web_player