npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flow-recorder

v7.2.1

Published

<p align="center"> <img src="https://github.com/cssberries/flow-recorder/blob/master/src/assets/logo/export/icon_name.png?raw=true" alt="Flow Recorder"/ width="480" height="320"> </p>

Downloads

24

Readme

Table of Contents

Intro

Flow Recorder is an automated video recorder for web applications.

Automated screen recording with flow-recorder provides many advantages:

  • Video content is always up to date.
  • The quality of the flows can be improved over time.
  • It's scalable - you can maintain hundreds of video flows.
  • Full control over actions speed of the entire flows and/or each step.
  • Playback speed of certain flow parts.
  • Exclude certain flow parts from capturing.
  • The same flow can be captured in different formats and sizes for different platforms.
  • Editing doesn't require any additional tools or skills.

Installation

To use flow-recorder in your project, run:

npm install flow-recorder

Config file

To get started, you need to create a config file.
In the config file, add an options array and pass it as an argument to the run() function:

const flowRecorder = require("flow-recorder");
let options = [
    {
        "name": "my-project",
        "presetsDir": "presets/",
        "scriptsDir": "scripts/",
        "outputDir": "assets/videos",

        "presets": [
            "blog",
            "you-tube",
            "whats-new"
        ],

        "scripts": [
            "find-a-product",
            "see-product-details",
            "buy-a-product"
        ]
    }
]
flowRecorder.run(options);

Config options

| key | Description | Default | Optional | | -------------------- | ------------------------------------------------------------------- | ----------- | -------- | | name | Project name that will be included in the exported video file name. | NA | | | rootDir | Root project directory. | "./" | optional | | assetsDir | Assets directory. | "./assets" | optional | | scriptsDir | Scripts directory. | "./scripts" | optional | | presetsDir | Presets directory. | "./presets" | optional | | outputDir | Generated videos directory. | "./output" | optional | | screenshotsDir | Screen shot directory. | "./output" | optional | | showStats | Shows info about capturing (debugging). | false | optional | | renderActualCursor | Visualizes the exact position of the cursor (debugging). | false | optional | | exportGif | Export animated gifs | false | optional | | encodeVideo | Encode video after capturing. | false | optional | | exportGifBulk | Export all scripts as animated gifs. | false | optional | | encodeVideoBulk | Encode all scripts as videos (for better quality/size ratio) | false | optional | | metaData: generate | Meta data will be generated. | false | optional | | metaData: outputPath | Meta data output directory. | "./output | optional |

Presets

Presets define basic properties of the media format, script pace and video quality. They especially useful if you have different platforms for sharing like video, blogs, emails and so on.

{
    "width": 1440,
    "height": 900,
    "scaleFactor": 1,
    "captureFPS": 60,
    "playbackFPS": 60,
    "stepDelay": 0,
    "videoBPS": 800000000,
    "speedFactor": 1,
    "audio": true,
    "soundEffects": true,
    "speech": true
}

Presets options

| key | Description | default | | ------------ | ----------------------------- | ------- | | width | Width of the media in pixels | 800 | | height | Height of the media in pixels | 800 | | scaleFactor | Scale factor of the media | 800 | | captureFPS | Width of the media in pixels | 800 | | playbackFPS | Width of the media in pixels | 800 | | stepDelay | Delay between steps | 800 | | videoBPS | Video quality | 800 | | speedFactor | Duration of each step | 800 | | audio | Capture audio | false | | soundEffects | Mouse clicks | false | | speech | Text to speech voice over | false |

Scripting

Scripts are plain JSON files:

{
    "url": "https://my-site.com",
    "stepDelay": 240,
    "speedFactor": 1,
    "steps": [{
            "startRecording": ""
        },
        {
            "click": "#b"
        },
        {
            "doubleClick": "#a"
        },
        {
            "tripleClick": "#b"
        },
        {
            "stopRecording": ""
        }
    ]
}

Scripts can be nested:

script-a.json

{
    "steps":[
        {
        "runScript": "./script-b.json"
        }
    ]
}

You can run multiple scripts in one project:

scripts:[
    "script_1",
    "script_2",
    "script_3"
]

Script options

Options should be provided in the script file itself:

{
    "url": "http://example.com",
    "speedFactor": 1000,
    "steps":[
        ...
    ]
}

Script steps

| Step | Description | Example | | ---------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | addStyleTag | Adds <style> tag to the given frame. | open | | position | Moves cursor to the center of the screen | open | | click | Navigates a cursor to a given target, actualize and visualize one click | open | | clickAndShoot | Navigates to a given target and makes one screenshot | open | | doubleClick | Navigates a cursor to a given target, actualize and visualize two clicks | | | dragAndDrop | Navigates to a given target, drags and drops after traveling for a given distance | open | | fastForward | Moves cursor to the center of the screen | open | | fastForwardStart | Moves cursor to the center of the screen | open | | fastForwardStop | Moves cursor to the center of the screen | open | | hover | Navigates a cursor to a given target | open | | hoverAboveList | Navigates a cursor to a given target and traveling through the list of items | open | | inputText | Navigates to a given target (if provided) and typing a given text | open | | navigate | Navigates to a given url | open | | page | Page provides methods to interact with a single tab | open | | pauseOn | Pauses recording when target appears | open | | pauseRecording | Pauses recording | open | | playSound | Moves cursor to the center of the screen | open | | position | Navigates to a given target, actualize and visualize three clicks | open | | removeStyleTag | Moves cursor to the center of the screen | open | | resumeOn | Resumes recording when target appears | open | | resumeRecording | Resumes recording | open | | rightClick | Navigates a cursor to a given target, actualize and visualize three clicks | open | | scrollBy | Navigates to a given target, actualize and visualize three clicks | open | | scrollIntoView | scrolls the element's parent container such that target is visible to the user | open | | shoot | Makes one screenshot | open | | speak | Moves cursor to the center of the screen | open | | startRecording | Starts recording | open | | stopOn | Stops recording when target appears | open | | stopRecording | Stops recording | | | subtitle | Moves cursor to the center of the screen | open | | tripleClick | Navigates a cursor to a given target, actualize and visualize three clicks | | | wait | Waits for a given amount of time | | | waitForSelector | Waits for target appearance | open | | zoomOn | Waits for target appearance | open |

iframes

At this point, flow-recorder supports one level of iframes. Nesting is not supported.
To select an element inside an iframe include "iframe" string as the first chain of the target selector:

{
    "click": "iframe .my-target"
}

Troubleshooting

Video file is longer/shorter than the content
It is probably due to this bug.

Video content is too fast/slow
Check speedFactor value in the preset and/or in the script.