Giter Site home page Giter Site logo

jfederico / recordrtc-rails_annotations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blindsidenetworks/recordrtc-rails_annotations

0.0 3.0 0.0 230 KB

Rails application for annotating with audio/video

Ruby 21.17% JavaScript 64.61% CoffeeScript 6.64% CSS 1.53% HTML 6.04%

recordrtc-rails_annotations's Introduction

README


REQUIRES

  • PostgreSQL
  • Ruby 2.4.0

And that's it!

SETUP

  • Use bundle install to install all required dependencies.
  • Run cp sample.env .env and change the database values in the file to suit your environment.
    • RECORDRTC_RAILS_ANNOTATIONS_HOST is the hostname of where PostgreSQL is running.
    • RECORDRTC_RAILS_ANNOTATIONS_USER is the username of the database owner in PostgreSQL.
    • RECORDRTC_RAILS_ANNOTATIONS_PASS is the password of the same database owner.
  • Run rails secret and place your generated secret keys (a different one for each Rails environment) in .env, for SECRET_KEY_BASE.
  • Place your own LTI key and secret in .env, for LTI_KEY and LTI_SECRET respectively. You will most likely obtain this from the person who set up the app for your uses.
  • Make sure your RAILS_ENV is set to production in .env.
  • Set RAILS_RELATIVE_URL_ROOT to the URL on which your app will be served, relative to the domain name, such as /xyz or /app. The default is /, meaning your app will be hosted at the root.
  • Modify the origins '*' line in config/initializers/cors.rb by replacing the asterisk with the domain name.
  • Run rails assets:precompile RAILS_RELATIVE_URL_ROOT=/xyz, where xyz is the root URL of your Rails app relative to your domain name.
  • Run rails railties:install:migrations, rails db:migrate and rails db:seed.
  • Start app with rails s.
  • To register the app the LTI 1.0 way, use the launch URL https://example.com/xyz/launch, where example.com is the domain name and xyz is the relative URL from which the app is served, if there is one. To register the LTI 2.0 way, use registration URL https://example.com/register. NOTICE: this app requires a secure connection over SSL to be able to use WebRTC. Your setup must be equipped for this.

KNOWN BUGS

  • App doesn't work in an iFrame (only on Moodle) because X-Frame-Options only allows iFrames of same domain origin (maybe after_action :disable_xframe_header?)

TO-DO

  • Add user (re)authentication where needed
  • Authenticate CSRF token before accessing API
  • Consider using OAuth2 gem instead of simple_oauth; check to see what is required to move over
  • TBD: Add support for audio recording (if determined to be needed)

NOTES

  • For now, it must be set in the Moodle external tool settings that this app should open in a new tab due to problems with the iFrame
  • As of yet, no known way to attach blob to file input in form, so a mock-form sent as XHR FormData is necessary in lieu of form_for
  • Cannot separate concerns for React files
  • DataTables is causing column-resizing troubles. For now, the too-large "Actions" column is not such a big deal
  • Session variables are a bit iffy right now; who knows what will happen when the same person has two open instances of the tool! Shouldn't be too much of a problem as the only things I am storing in the session are unchanging.
  • API is using session to get account_id and present only videos belonging to that user, which violates the statelessness of it; consider switching to JWT instead of sessions

recordrtc-rails_annotations's People

Contributors

jfederico avatar

Watchers

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