Coder Social home page Coder Social logo

ash80 / screenrecorder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ailtondvieira/screenrecorder

0.0 0.0 0.0 180 KB

Flutter package which can be used to record flutter widgets

Home Page: https://pub.dev/packages/screen_recorder

License: MIT License

Objective-C 0.21% Kotlin 0.70% Dart 84.12% Swift 6.52% HTML 8.46%

screenrecorder's Introduction

pub.dev Sponsoring likes popularity pub points


๐Ÿšง This is highly experimental! ๐Ÿšง

๐Ÿšง API is subject to change! ๐Ÿšง

This is a package to create recordings of Flutter widgets. The recordings can be exported as GIFs.

This is pure Flutter/Dart implementation without any dependencies on native or platform code. Thus it runs on all supported platforms.

Please note, that the encoding of the GIF takes a lot of time. On web it is basically useless because it takes so much time.

๐Ÿš€ Getting Started

Setup

First, you will need to add screen_recorder to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
  screen_recorder: x.y.z # use the latest version found on pub.dev

Then, run flutter packages get in your terminal.

Example

Wrap your widget which should be recorded in a ScreenRecorder:

ScreenRecorder(
  height: 200,
  width: 200,
  background: Colors.white,
  controller: ScreenRecorderController(
    pixelRatio: 0.5,
    skipFramesBetweenCaptures: 2,
  ),
  child: // child which should be recorded
);

Then use ScreenRecorderController.start() to start recording and ScreenRecorderController.stop() to stop the recording. final gif = await ScreenRecorderController.export() gives you the result which can be written to disk.

A complete example can be found here.

โš ๏ธ Known issues and limitations

  • Platform views are invisible in screenshots (like webview or Google Maps). For further details, see this Flutter issue and this issue. Please give a ๐Ÿ‘ to those issues in order to raise awareness and the prio of those issues.
  • Web only works with Flutter's CanvasKit Renderer, for more information see Flutter Web Renderer docs.
  • This package does not and will not support audio until it is possible in a pure Dart/Flutter environment.
  • This package does not and will not support exporting as a video until it is possible in a pure Dart/Flutter environment.

Convert gif to video

In order to convert the gif to a video, you can try one of the following libraries. Please note, that compatibility was not tested.

Library Stats
ffmpeg_kit_flutter likes popularity pub points
flutter_video_compress likes popularity pub pointsย 
video_editor likes popularity pub points
video_trimmer likes popularity pub points
video_compress likes popularity pub points

๐Ÿ“ฃ About the author

GitHub followers Twitter Follow

Contributors

screenrecorder's People

Contributors

ueman avatar omartinma avatar arturplaczek avatar mvanbeusekom avatar tc3oliver avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.