vimeo_video_player 1.0.1 copy "vimeo_video_player: ^1.0.1" to clipboard
vimeo_video_player: ^1.0.1 copied to clipboard

A Flutter package to play Vimeo videos using their Video ID. Utilizes InAppWebView for smooth video playback directly in your Flutter app.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:vimeo_video_player/vimeo_video_player.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: MyHomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  /// Used to notify that video is loaded or not
  bool isVideoLoading = true;

  /// Controller of the WebView
  InAppWebViewController? webViewController;

  @override
  void dispose() {
    super.dispose();
    webViewController?.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black,
      body: SafeArea(
        child: Stack(
          children: [
            VimeoVideoPlayer(
              videoId: '12860646',
              isAutoPlay: true,
              onInAppWebViewCreated: (controller) {
                webViewController = controller;
              },
              onInAppWebViewLoadStart: (controller, url) {
                setState(() {
                  isVideoLoading = true;
                });
              },
              onInAppWebViewLoadStop: (controller, url) {
                setState(() {
                  isVideoLoading = false;
                });
              },
            ),
            if (isVideoLoading)
              const Center(child: CircularProgressIndicator()),
          ],
        ),
      ),
    );
  }
}
copied to clipboard
71
likes
150
points
3.43k
downloads
screenshot

Publisher

verified publishermindinventory.com

Weekly Downloads

2024.09.16 - 2025.03.31

A Flutter package to play Vimeo videos using their Video ID. Utilizes InAppWebView for smooth video playback directly in your Flutter app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_inappwebview

More

Packages that depend on vimeo_video_player