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 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-triggerable-browser-utils

v0.1.0

Published

A fork of node-red-contrib-browser-utils with triggerable nodes for browser interaction (camera, microphone, file upload) via flows. Based on original work by IBM Corp. and contributors.

Downloads

17

Readme

node-red-contrib-triggerable-browser-utils

日本語版はこちら (Japanese version)

Node-RED nodes for browser functionality such as file upload, camera, and microphone
with support for triggering from Inject nodes and function nodes, not just the node-side button.


About this project

This repository is a fork of node-red-contrib-browser-utils.
In addition to the original "button-only trigger" design, this version allows camera, microphone, and file upload nodes to be triggered from Inject nodes, Function nodes, or any upstream node in your flow.


Install

Run the following command in the root directory of your Node-RED install:

npm install node-red-contrib-triggerable-browser-utils

Or using Node-RED's Palette Manager:

  1. Go to the Node-RED menu
  2. Select "Manage palette"
  3. Click the "Install" tab
  4. Search for "triggerable-browser-utils"
  5. Click install

Usage

Triggerable Camera (trig camera)

The camera node allows you to capture images from a connected camera or webcam.

Features:

  • Trigger image capture from inject nodes or the node's button
  • Select specific camera device when multiple cameras are available
  • Choose output format: Buffer or Base64 string
  • Set interval for continuous captures
  • Supports Chrome and Firefox browsers

Properties:

  • Name: Customize the node name
  • Interval (ms): Set delay between captures for continuous mode (default: 2000ms)
  • Camera: Select which camera device to use
  • Output Format: Choose between Buffer (default) or Base64 string

Outputs:

  • msg.payload: The captured image in PNG format (as Buffer or Base64 string)
  • msg.content_type: 'image/png'
  • msg.format: 'buffer' or 'base64'
  • msg.timestamp: Capture timestamp

Control via message:

// Basic trigger
msg.payload = {}; // Simple trigger

// With specific command
msg.payload = { command: "capture" }; // Take a single picture
msg.payload = { command: "start" }; // Start camera
msg.payload = { command: "stop" }; // Stop camera
msg.payload = { command: "loop", interval: 5000 }; // Continuous capture every 5 seconds

Triggerable Microphone (trig microphone)

The microphone node enables audio recording from a connected microphone.

Features:

  • Start/stop recording via inject nodes or the node's button
  • Toggle behavior: first trigger starts recording, second trigger stops
  • Select specific microphone device when multiple are available
  • Supports Chrome and Firefox browsers (HTTPS required)

Properties:

  • Name: Customize the node name
  • Microphone: Select which microphone device to use

Outputs:

  • msg.payload: The recorded audio in WAV format (Buffer)
  • msg.content_type: 'audio/wav'
  • msg.timestamp: Recording timestamp

Control via message:

// Toggle recording (start/stop)
msg.payload = {}; // Simple trigger toggles recording state

// With specific command
msg.payload = { command: "start" }; // Start recording
msg.payload = { command: "stop" }; // Stop recording and output WAV

Triggerable File Inject (trig file inject)

The file inject node allows uploading files from the browser to your flow.

Features:

  • Two operation modes:
    1. Pre-configured file: Upload and store a file in the node's configuration
    2. On-demand selection: Trigger a file selection dialog when activated
  • Trigger file sending via inject nodes or the node's button

Properties:

  • Name: Customize the node name
  • File: Select and upload a file to store in the node (when in pre-configured mode)

Outputs:

  • msg.payload: The file data (Buffer)
  • msg.filename: Original filename
  • msg.mimetype: MIME type of the file

Control via message:

// Simple trigger to send the pre-configured file
msg.payload = {}; // Sends the configured file

// Using stored file allows automated workflows without manual file selection

Browser Compatibility and Requirements

  • HTTPS Required: Camera and microphone access require a secure context (HTTPS)
  • Supported Browsers: Chrome, Firefox, and other modern browsers
  • Permissions: Users must grant permission to access camera and microphone
  • Dashboard Usage: Works great with Node-RED dashboard, allowing user media interaction

Technical Details

Camera Node

  • Uses navigator.mediaDevices.getUserMedia() for camera access
  • Captures images by drawing video frames to a canvas element
  • Converts to PNG format using canvas.toBlob()
  • Images are sent back to Node-RED via HTTP POST

Microphone Node

  • Uses Web Audio API for recording
  • Records audio in WAV format
  • Maximum recording time is limited by browser memory

File Inject Node

  • Uses standard HTML5 file input for file selection
  • Pre-configured files are stored in Base64 format

Tips for Use

  1. Use with Dashboard: These nodes work well in dashboard environments for interactive applications

  2. Error Handling: Always add error handling since browser permissions might be denied

  3. Multiple Instances: You can have multiple instances of each node targeting different devices

  4. Security: Remember that all browser interactions require user permission

  5. Chain Processing: Connect to image/audio processing nodes for advanced applications


Main differences from the original

  • Triggering from flows: All nodes can now be triggered by Inject, Function, or other nodes, not just the node-side button
  • Device selection: Added ability to select specific camera and microphone devices
  • Output formats: Camera node supports both Buffer and Base64 output
  • Pre-configured files: File inject node can store files for automated workflows

Contributing & License

Pull requests and bug reports are welcome.
This project is licensed under the Apache 2.0 license.

This repository is based on work by IBM Corp. in node-red-contrib-browser-utils,
with modifications and enhancements by Nobisuke Sugawara.