qyplayer 0.0.4 copy "qyplayer: ^0.0.4" to clipboard
qyplayer: ^0.0.4 copied to clipboard

outdated

a versatile video player. Supports m3u8, flv, mp4, and more. Simple, yet powerful, with a clean interface for seamless video playback in your Flutter projects.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:qyplayer/qyplayer.dart';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'QYPlayer',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

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

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(
      const SystemUiOverlayStyle(
        systemNavigationBarColor: Colors.black,
        statusBarColor: Colors.black,
        statusBarIconBrightness: Brightness.light,
      ),
    );
    return Scaffold(
      body: QYPlayer(
        width: MediaQuery.of(context).size.width,
        height: MediaQuery.of(context).size.height,
        // src: 'https://1500005690.vod2.myqcloud.com/43843704vodtranscq1500005690/5578c8d15576678020498382480/adp.10.m3u8?t=66cec82a&us=7034581&sign=913c62de0a9517929814c1b668b90561',
        // src: 'https://hw-adaptive.pull.yximgs.com/gifshow/ItklbstgP-0_GameAvcHdL2LiveChn.flv?hwTime=6576c712&hwSecret=a9a8bd2678aef69bb1e37734f45a203a&tsc=origin&oidc=watchmen&sidc=204180&fd=1&ss=s20&kabr_spts=-5000',
        src: 'http://live.m2.tv/hls3/stream.m3u8',
        // 'https://1251515374.vod2.myqcloud.com/05243224vodcq1251515374/1745a32b3270835013023907100/playlist_eof.m3u8',
      ),
    );
  }
}
5
likes
0
points
43
downloads

Publisher

verified publisherdei3.com

Weekly Downloads

a versatile video player. Supports m3u8, flv, mp4, and more. Simple, yet powerful, with a clean interface for seamless video playback in your Flutter projects.

Repository

License

unknown (license)

Dependencies

ffmpeg_kit_flutter, flutter, provider, video_player

More

Packages that depend on qyplayer