Giter Site home page Giter Site logo

moonglass's Introduction

Moonglass

A front end for the Moonfire NVR

This is a work in progress, but is basically functional.

To run the web app as a development server:

  • clone this repository - git clone https://github.com/clydebarrow/moonglass.git
  • cd into moonglass/webapp
  • Create the file "local.properties" and add a line like this:
nvrHost=http://192.168.1.50:8080

where the url points to your installation of Moonfire NVR.

  • Run the command:
gradlew browserDevelopmentRun --continuous

A browser window should open, presenting the UI.

To install onto the NVR server

There are two ways of doing this.

Replace the docker image

Edit the nvr script created during installation of Moonfire-nvr. Locate the line like:

image_name="scottlamb/moonfire-nvr:v0.6.6"

Replace this with:

image_name="clydeps/moonglass:0.1.0"

Stop the nvr, remove the container and restart:

nvr stop
docker rm moonfire-nvr
nvr run

Reload the UI from localhost:8080 (or wherever it is served from.) Enjoy.

Using a proxy server

You will need to set up a proxy server - nginx is recommended. The Moonglass production files need to be copied to the NVR server - you can automate this by defining an scp destination in local.properties, e.g.:

With this defined, you can simply run gradlew deploy and the production files will be copied to the given destination. To manually build run this command:

gradlew browserProductionWebpack

Then recursively copy all files in build/distributions to the server.

There is a sample nginx config file provided - you will need to change the hostname as required, and the file location as chosen above.

Place the config file in /etc/nginx/conf.d/ on the server, then restart nginx. Now browse to the server and the ui should load. The proxy server will deliver the Moonglass files while proxying the API requests to the Moonfire NVR running on the same host.

moonglass's People

Contributors

clydebarrow avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

moonglass's Issues

Enable touch actions for dragging

The livestatus element can be dragged with the mouse, but this currently does not work with touch.
A fling to dismiss would also be nice

Allow saving custom layouts in live view

Should allow a given setup (layout and streams) to be saved as a named layout. These would appear in the drop-down list in the navbar.

Need some way of managing these - deleting, and sorting.

Enable full-screen player

Video player should be able to be zoomed to fit the window/and or the full screen.

Currently the full screen button in the standard player controls is present, but does not work properly.

Keystroke bindings

Implement keyboard actions.

Suggestions:

  • Esc dismisses a modal element
  • Space toggles play/pause
  • Left/right arrows jump the playback back or forward
    • and - increment and decrement playback speed
  • Enter resets playback speed to 1.0
  • Pageup/Pagedown move between video segments

These should be mapped by a global listener to broadcast events describing the action.

A second stage would allow user customisation of the bindings.

Implement scrub bar

Create a new content page allowing multiple recordings to be played back at the same time, in sync.

A scrub bar should display time stamps and tick marks and be draggable across a central cursor. The playback will be synced to the bar

The navbar selector widget should allow selection of a day and a time range (limited to 24 hours.)

Pause playback when in background

User the document.visibilityState and visibilitychange event to pause playback when the browser tab becomes invisible, and resume when it returns.

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.