klipt_video_player 1.1.2 copy "klipt_video_player: ^1.1.2" to clipboard
klipt_video_player: ^1.1.2 copied to clipboard

A Flutter video player with multiple gesture support, based on Chewie and added danmaku (bullet/barrage) function inside it.

example/main.dart

import 'package:klipt_video_player/klipt_video_player.dart';
import 'package:klipt_video_player/custom_chewie/src/klipt_video_player.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  final String? title;

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

class _MyHomePageState extends State<MyHomePage> {
  final List<DanmakuData> list = [
    DanmakuData(content: "a initial danmaku", time: 2000, position: 1),
    DanmakuData(content: "a fantastic danmaku", time: 2500, position: 1),
    DanmakuData(content: "a working danmaku", time: 3000, position: 1),
    DanmakuData(content: "a bottom danmaku", time: 3500, position: 2)
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        /// MUST use createWithDependencies
        child: KliptVideoView.createWithDependencies(
          "https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4",
          autoPlay: true,
          looping: true,
          aspectRatio: 16 / 9,
          rightButtonList: null,
          videoTitle: "A butterfly demo",
          danmakuList: list,
          primaryColor: Colors.pinkAccent,
        ),
      ),
    );
  }
}
0
likes
0
pub points
42%
popularity

Publisher

verified publishervivatlantis.com

A Flutter video player with multiple gesture support, based on Chewie and added danmaku (bullet/barrage) function inside it.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

battery_plus, flutter, flutter_overlay, fluttertoast, get, provider, screen_brightness, side_sheet, video_player, volume_controller, wakelock_plus

More

Packages that depend on klipt_video_player