fijkplayer 0.5.0

fijkplayer (Video player plugin for Flutter) Flutter 媒体播放器 #

手把手带你写 Flutter 系统音量插件Flutter 多版本管理工具 fvm

pub package     Action Status    

A Flutter media player plugin for iOS and android based on ijkplayer

您的支持是我们开发的动力。 欢迎Star,欢迎PR~。 Feedback welcome and Pull Requests are most welcome!

Documentation 文档 #

Installation 安装 #

Add fijkplayer as a dependency in your pubspec.yaml file.

pub package

dependencies:
  fijkplayer: ^{{latest version}}

Replace {{latest version}} with the version number in badge above.

Use git branch which not published to pub.

dependencies:
  fijkplayer:
    git:
      url: https://github.com/befovy/fijkplayer.git
      ref: develop # can be replaced to branch or tag name

Example 示例 #

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

class VideoScreen extends StatefulWidget {
  final String url;

  VideoScreen({@required this.url});

  @override
  _VideoScreenState createState() => _VideoScreenState();
}

class _VideoScreenState extends State<VideoScreen> {
  final FijkPlayer player = FijkPlayer();

  _VideoScreenState();

  @override
  void initState() {
    super.initState();
    player.setDataSource(widget.url, autoPlay: true);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: Text("Fijkplayer Example")),
        body: Container(
          alignment: Alignment.center,
          child: FijkView(
            player: player,
          ),
        ));
  }

  @override
  void dispose() {
    super.dispose();
    player.release();
  }
}

Already in use in following apps #

Contact me or create pull request to add your app here.

Contributors 贡献者 ✨ #

Thanks goes to these wonderful people (emoji key)

This project follows the all-contributors specification. Contributions of any kind welcome

iOS Warning 警告 #

Warning: The fijkplayer video player plugin is not functional on iOS simulators. An iOS device must be used during development/testing. For more details, please refer to this issue.

Next Plan 计划 #

See the development plan of next version in https://github.com/befovy/fijkplayer/projects/2

Changelog #

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.


0.5.0 (2020-01-06)


0.4.2 (2020-01-03)


0.4.1 (2020-01-01)


0.4.0 (2019-12-30)

  • api and host-option for keep screen on (#153) (12d1df0)
  • remove opaque in FijkValue (34ecb83)

0.3.0 (2019-12-23)


0.2.3 (2019-11-28)


0.2.2 (2019-11-22)


  • add Android audiofocus request and releasse. closes #89
  • add hostOptions for iOS and Android (#114) (9bb344a), closes #113
  • buffer percent, notify current position from msg queue (#111) (86357fe)
  • example: enable-accurate-seek option, fix #113 (7b72f77)

0.2.1 (2019-11-16)


  • fix: wrong screen orientation after exit full screen mode on Android (#108) (d0fea2c), closes #73

0.2.0 (2019-11-15)


0.1.10 (2019-11-15)


  • new API, FijkVolume.getVol() (#100) (dd57cea)
  • set datasource member variable when setDataSource (20f94de)
  • proguard for android class (1f85f28), closes #98
  • update doc error method name. FijkVolume.setUIMode (#102) (c33cc11)

0.1.9 #


  • FijkView: fix fullscreen no state, no refresh when state change #77
  • panel: fix error CircularProgressIndicator when autoPlay is false #76

0.1.8 #


  • FijkView: add fsFit argument, controls full screen FijkFit mode

0.1.7 #


  • fijkplayer: fix android volume double float cast error
  • fijkplayer: fix error pause state after seeking #65

0.1.6 #


  • fijkplayer: update FijkVolume API, break change

0.1.5 #


  • ios: fix NSUrl parse error
  • fijkplayer: add FijkLog with levels
  • docs: english translation
  • fijkplayer: new feature fijkvolume, system volume API
  • ijkplayer: set default option start-on-prepated to 0
  • iOS: fix CocoaPods use_frameworks! error

0.1.3 #


  • ffmpeg: enable concat and crypto protocol
  • fijkplayer: add static method all() to get all fijkplayer instance
  • fix: issue #31, pixelbuffer crash on iOS

0.1.2 #


  • fijkvalue: add video / audio render started
  • fijkplayer: remove setIntOption API, use setOption instead

0.1.1 #


  • fix fijkpanel slider value out of range
  • android: add androidx support

0.1.0 #

  • update ijkplauer to f0.3.5
  • fijkplayer err state and FijkException
  • support playing flutter asset file
  • unit test and widget test
  • pass fijkoption arguments and set player's option

0.0.9 #


  • update ijkplayer to f0.3.4
  • add RTSP support
  • decrease libary binary size

0.0.8 #


  • update ijkplayer to f0.3.3
  • fix reset bug, #26
  • Add doc website, https://fijkplayer.befovy.com
  • Add diagram about FijkState, update FijkState document

0.0.7 #


  • Update FijkView widget tree, add FijkFit (scaling mode)
  • fix pixelbuffer leak on iOS

0.0.6 #


  • FijkSourceType as a option argument

0.0.5 #


  • add FijkPanel (UI controller of video)

0.0.3 #


  • add more comment and update README

0.0.2 #


  • make iOS CocoaPods FIJKPlayer available

0.0.1 #


  • A usable music player plugin
  • Draw the video frame through surface for android

example/README.md

fijkplayer demo #

Demonstrates how to use the fijkplayer plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Run Mac OS Desktop Example #

cd fijkplayer/go/dlib/darwin
wget https://github.com/befovy/ijkplayer/releases/download/f0.4.0/libIjkPlayer.dylib
go get -u -v github.com/go-flutter-desktop/hover
cd fijkplayer/example
hover plugins get
hover run
Logo 通过 DesignEvo 设计制作

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  fijkplayer: ^0.5.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:fijkplayer/fijkplayer.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
86
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
93
Learn more about scoring.

We analyzed this package on Feb 12, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/core/fijkplayer.dart.

Run flutter format to format lib/core/fijkplayer.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test