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

web-media-player

v0.3.0

Published

Simple media player controlled by a web interface. Designed for Raspberry Pi.

Downloads

6

Readme

Node.js web media player Build status npm package

This application allows you to control a simple media player via a web interface. I wrote it so that I could play video files on my Raspberry Pi.

This could really use some AJAX features - right now the state is only refreshed when a new page is requested. I might work on this in the future.

Getting started

  • Install node.js.

  • git clone https://github.com/nylen/node-web-media-player.git (or npm install web-media-player)

  • cd node-web-media-player and npm install

  • Copy one of the example config files to config/default.yml and edit as needed.

  • node server.js

Configuration settings

  • player.mediaPath - the root path for your media files.

  • player.mount.ifNotExists and player.mount.command - if these settings are present, then check whether the file specified by ifNotExists exists (relative to the mediaPath), and if it doesn't, then run the command specified by command. This feature can be used to automatically mount the media storage directory. Use %d for the path to the media storage directory, if needed.

  • player.commands.start - the command that should be used to run the media player for a file. This should be a command-line media player like mplayer or omxplayer. Use %f for the filename.

  • player.commands.kill - the command that should be used to kill the media player. This is only used as a last resort if sending player.controls.exit doesn't work.

  • player.controls.(play|pause|exit) - the keypresses that should be sent to the stdin of the media player process to perform the desired action. This should work as if you had started the media player on the command line and pressed the specified key(s). player.controls.exit should stop the player and cause the process to exit.

  • player.controls.seek - a dictionary where the keys are positive or negative numbers of seconds (given as strings), and the values are the key sequences needed to make the media player seek by the given number of seconds.

  • player.exitTimeout - when player.controls.exit is sent, wait for this amount of time in milliseconds. If the player process has not exited by then, kill it. If specified, player.commands.kill will be used. Otherwise, the player process will be sent a SIGTERM (which does not seem to work with omxplayer).