youtube_player_embed 1.0.9 copy "youtube_player_embed: ^1.0.9" to clipboard
youtube_player_embed: ^1.0.9 copied to clipboard

A Flutter package for embedding YouTube videos with customizable options.

example/lib/main.dart

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

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'YouTube Player Embed Demo',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('YouTube Player Example'),
        ),
        body: const Center(
          child: YoutubePlayerView(
            videoId:
                "pUb9EW770d0", // 'shorts_video_id' Replace with a YouTube Shorts or normal video ID
            autoPlay: true,
            mute: false,
            enabledShareButton: false,
            aspectRatio: 16 / 9,
          ),
        ),
      ),
    );
  }
}
6
likes
160
points
249
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for embedding YouTube videos with customizable options.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, flutter_inappwebview

More

Packages that depend on youtube_player_embed