Git Product home page Git Product logo

cordova-plugin-screen-recorder's Introduction

安卓屏幕录制插件

Android 屏幕录制(屏幕捕捉)的 Cordova 插件。此插件可以将屏幕录制保存为视频到设备的相册中,当用户首次开始录制时,它会请求必要的权限,并在屏幕录制期间创建一个活动通知。

必备条件

Apache Cordova

Cordova Android 12.0.0下运行正常

Installation

Cordova 根目录运行以下命令:

cordova plugin add https://github.com/DUWENINK/cordova-plugin-screen-recorder.git

Usage

首先,将以下偏好设置添加到项目的 config.xml 文件中。

<preference name="AndroidXEnabled" value="true" />

现在你可以继续编写应用的代码,使用以下代码开始录制:

ScreenRecord.startRecord(opts, fileName, function success(), function error());

opts 是一个具有以下属性的 JSON 对象:

  • recordAudio:是否录制音频,默认为 false
  • bitRate:视频比特率,默认为 6000000
  • title:通知标题,默认为 Screen Recording
  • text:通知文本,默认为 Screen recording active...
  • isHide:是否推出到后台,默认为true

要停止录制,调用以下方法:

ScreenRecord.stopRecord(function success(), function error());

当录制停止后,视频会被保存到内存中,然后你可以从相册中播放视频。

License

996.ICU: 工作 996,生病 ICU。

cordova-plugin-screen-recorder's People

Watchers

Reynaldo Baltz avatar

Forkers

gitguanjia

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.