Coder Social home page Coder Social logo

splevine / node-web-media-player Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nylen/node-web-media-player

0.0 2.0 0.0 858 KB

Super simple media player controller designed for Raspberry Pi.

License: Other

JavaScript 43.98% CSS 47.61% HTML 8.41%

node-web-media-player's Introduction

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).

node-web-media-player's People

Contributors

nylen avatar

Watchers

James Cloos avatar SL 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.