smart_video_player 1.2.1 copy "smart_video_player: ^1.2.1" to clipboard
smart_video_player: ^1.2.1 copied to clipboard

A simple video player widget for Flutter applications with enhanced playback controls and features.

example/smart_video_player_example.dart

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

class VideoPlayerPage extends StatelessWidget {
  VideoPlayerPage({super.key});

  final List<String> videoPaths = [
    "https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black,
      appBar: AppBar(
        title: Text(
          "Smart video player",
          style: TextStyle(
            color: Colors.black,
            fontSize: 16,
          ),
        ),
      ),
      extendBodyBehindAppBar: true,
      body: Stack(
        children: [
          Positioned.fill(
            child: PageView.builder(
              itemCount: videoPaths.length,
              controller: PageController(initialPage: 0),
              itemBuilder: (context, index) {
                return SmartVideoPlayer(
                  videoUrl: videoPaths[index],
                  sourceType: SmartVideoSourceType.network,
                );
              },
            ),
          ),
        ],
      ),
    );
  }
}
0
likes
140
points
511
downloads

Publisher

unverified uploader

Weekly Downloads

A simple video player widget for Flutter applications with enhanced playback controls and features.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

audio_session, carousel_slider, chewie, flutter, flutter_cache_manager, video_player, video_player_android, visibility_detector_widget

More

Packages that depend on smart_video_player