All Projects → MuhmdHsn313 → IQPlayer

MuhmdHsn313 / IQPlayer

Licence: MIT license
Simple video player with subtitle for flutter.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to IQPlayer

rx shared preferences
🌀 Shared preferences with RxDart Stream observation ⚡️ Reactive shared preferences for Flutter 🌸Reactive stream wrapper around SharedPreferences 🍄 Lightweight and easy-to-use 🌱 A reactive key-value store for Flutter projects. Like shared_preferences, but with Streams 📕 Rx Shared Preferences for Flutter 🌿 rx_shared_preferences 🌰 rx_shared_prefere…
Stars: ✭ 36 (+125%)
Mutual labels:  flutter-package, flutter-bloc
ASCIIPlay
A simple video player that renders to ASCII written in C
Stars: ✭ 30 (+87.5%)
Mutual labels:  video-player, subtitle
flutter-bloc-patterns
A set of most common BLoC use cases built on top of flutter_bloc library
Stars: ✭ 58 (+262.5%)
Mutual labels:  flutter-package, flutter-bloc
niki
Media Player, DLNA, Music, Video and Streaming
Stars: ✭ 14 (-12.5%)
Mutual labels:  video-player, subtitle
dailymotion-player-sdk-ios
Dailymotion Player SDK for iOS
Stars: ✭ 58 (+262.5%)
Mutual labels:  video-player
survey kit
Flutter library to create beautiful surveys (aligned with ResearchKit on iOS)
Stars: ✭ 68 (+325%)
Mutual labels:  flutter-package
advene
Official Advene repository
Stars: ✭ 32 (+100%)
Mutual labels:  video-player
oplayer
👾 react native video player for expo
Stars: ✭ 25 (+56.25%)
Mutual labels:  video-player
sliding panel
A Flutter slidable widget that provides an easy to use configuration. Highly customisable. Just as you want it!
Stars: ✭ 88 (+450%)
Mutual labels:  flutter-package
sweetalert
sweetalert for flutter
Stars: ✭ 52 (+225%)
Mutual labels:  flutter-package
change app package name
Change App Package Name with single command. It makes the process very easy and fast.
Stars: ✭ 72 (+350%)
Mutual labels:  flutter-package
juxtapose
A flutter widget for comparing two stacked widgets by dragging a slider thumb to reveal either sides of the slider horizontally or vertically.
Stars: ✭ 75 (+368.75%)
Mutual labels:  flutter-package
wsPlayer
wsPlayer is a web video player based on WebSocket-fmp4.
Stars: ✭ 88 (+450%)
Mutual labels:  video-player
swipedetector
A Flutter package to detect up, down, left, right swipes.
Stars: ✭ 34 (+112.5%)
Mutual labels:  flutter-package
flutter-rehberi
Flutter için Türkçe ve İngilizce kaynakların toplandığı rehber
Stars: ✭ 730 (+4462.5%)
Mutual labels:  flutter-package
Chi Food
Food Delivery App made by Flutter and Bloc
Stars: ✭ 103 (+543.75%)
Mutual labels:  flutter-bloc
shimmer animation
This shimmer animation widget can help you bring simple yet beautiful skeleton loaders to your flutter app with ease.
Stars: ✭ 29 (+81.25%)
Mutual labels:  flutter-package
dartssh2
SSH and SFTP client written in pure Dart, aiming to be feature-rich as well as easy to use.
Stars: ✭ 63 (+293.75%)
Mutual labels:  flutter-package
clappr-stats
A clappr plugin to report playback statuses (timers: session, buffering, watch and counters: play, pause, error, fps)
Stars: ✭ 40 (+150%)
Mutual labels:  video-player
Interactive-Add-Button-Layout
Custom Layout with interactive add button to impove your UI and UX .
Stars: ✭ 20 (+25%)
Mutual labels:  flutter-package

IQPlayer

Simple video player with subtitle wrote for Flutter.

GitHub release (latest by date) GitHub GitHub followers

This package as a gift for my teacher and my leader Mr. Muqtada Al-Sadr.

Proudly based on BLoC.

Screenshot_1589120660

Features

  1. Play video from Assets, Files, Network by VideoPlayerController from video_player.
  2. Parse subtitles from Assets, Files, Network SubtitleProvider class.
  3. Custom theme you can use with IQTheme class.
  4. Support Subtitles:
    1. VTT format
    2. SRT format
    3. User define format
  5. IQScreen: a video player scaffold screen.
  6. IQPlayer: a widget enable you to watch video implement with your screen.
  7. IQParser: a subtitle package that view subtitles, included the widget and parser.
  8. IQTheme: to make your customizations on player ui and make it more integrated with your own app.

Installation

1. Depends on

Go to pubspec.yaml and add it to the dependencies list like:

dependencies:
  iqplayer: <latest_version>

Install packages from the command line with Flutter:

flutter pub get

2. Install

Android

Ensure the following permission is presented in your Android Manifest file, located in /android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>

The Flutter project template adds it, so it may already be there.

IOS

Warning: The video player is not functional on iOS simulators. An IOS device must be used during development/testing.

Add the following entry into your Info.plist file, located in /ios/Runner/Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

This entry allows your app to access video files by URL.

3. Import

Now in your Dart files, you can use:

import "package:iqplayer/iqplayer.dart";

Componets

  1. IQScreen:
IQScreen(
  videoPlayerController = VideoPlayerController.network(""),
  subtitleProvider: SubtitleProvider.fromNetwork(""),
  title: "Simple Video",
  description: "Simple Description",
);
  1. IQPlayer:

In development.

  1. IQParser:

Note: It is used automatically with IQScreen and you can use and display data with SubtitleProvider.

BlocProvider<SubtitleBloc>(
  create: (context) =>
    SubtitleBloc(
      SubtitleProvider.fromNetwork(""),
    )..add(FetchSubtitles()),
    child: MyParser(),
);
  1. IQTheme:

Note: You can customize your theme on IQScreen, IQPlayer or IQParser with this class.

You have +17 option to customize theme!

 IQScreen(
    ...
    iqTheme: IQTheme(
      ...
    ),
 );

Using

  1. Start using IQScreen with Navigator:
Navigator.push(
  context,
  MaterialPageRoute(
    builder: (BuildContext context) => IQScreen(
    title: "",
    description: "",
    videoPlayerController: VideoPlayerController.network(""),
    subtitleProvider: SubtitleProvider.fromNetwork(""),
   ),
  ),
);
  1. Using of IQParser:

You have to use BlocProvider with SubtitleProvider to configure subtitles.

// In Your widget
BlocProvider<SubtitleBloc>(
  create: (context) =>
    SubtitleBloc(
      SubtitleProvider.fromNetwork(""),
    )..add(FetchSubtitles()),
    child: MyParser(),
);

// new parser class, you can exclude `MyParser`
class MyParser extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return IQParser();
  }
}

Note: You can exclude "MyParser" and delete it!

Note: What is the reason for creating MyParser? see this

  1. You can use IQTheme to customize ui like:

You have +17 option to customize theme!

IQTheme(
    loadingProgress: SpinKitCircle(
      color: Colors.red,
    ),
    playButtonColor: Colors.transparent,
    videoPlayedColor: Colors.indigo,
    playButton: (bool isPlay) {
    if (isPlay)
        return Icon(
            Icons.pause_circle_filled,
            color: Colors.red,
            size: 50,
        );
    return Icon(
        Icons.play_circle_outline,
        color: Colors.red,
        size: 50,
        );
    },
);

Example

import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:iqplayer/iqplayer.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'IQPlayer Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'IQPlayer Demo'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: RaisedButton(
          child: Text('Open IQPlayer'),
          onPressed: () {
            Navigator.push(
              context,
              MaterialPageRoute(
                builder: (BuildContext context) => IQScreen(
                  title: title,
                  description: 'Simple video as a demo video',
                  videoPlayerController: VideoPlayerController.network(
                    'https://d11b76aq44vj33.cloudfront.net/media/720/video/5def7824adbbc.mp4',
                  ),
                  subtitleProvider: SubtitleProvider.fromNetwork(
                      'https://duoidi6ujfbv.cloudfront.net/media/0/subtitles/5675420c9d9a3.vtt'),
                  iqTheme: IQTheme(
                    loadingProgress: SpinKitCircle(
                      color: Colors.red,
                    ),
                    playButtonColor: Colors.transparent,
                    videoPlayedColor: Colors.indigo,
                    playButton: (bool isPlay) {
                      if (isPlay)
                        return Icon(
                          Icons.pause_circle_filled,
                          color: Colors.red,
                          size: 50,
                        );
                      return Icon(
                        Icons.play_circle_outline,
                        color: Colors.red,
                        size: 50,
                      );
                    },
                  ),
                ),
              ),
            );
          },
        ),
      ),
    );
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].