🔫 Dplayer backend for rails 弹幕军火库。姬~~。。 超电磁炮!!!
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Upgrade rails 5.2.0 Aug 7, 2018
bin
config
db
lib/tasks
log
public
test Upgrade rails 5.2.0 Aug 7, 2018
tmp
vendor
.gitignore
.ruby-version
.travis.yml
Gemfile
Gemfile.lock Fix cors Aug 7, 2018
README.md
Rakefile Init rails Feb 9, 2018
config.ru Init rails Feb 9, 2018

README.md

RailsGun

Build Status

System dependencies

  • Ruby version >=2.5.0

  • Rails version 5.2.0

  • Dplayer >= v1.22.0

Install && Run

bundle install
  • Configuration
vim config/database.yml
  • Database creation
rake db:setup
  • Test run
rails server
  • production
export RAILS_ENV=production
export SECRET_KEY_BASE=...............

# start railsgun in daemon
rails server -d

TestUnit

rails test

Danmaku API

Only support dplayer v2 interface

var dp = new DPlayer({
    container: document.getElementById('dplayer'),
    screenshot: true,
    video: {
        url: 'demo.mp4',
        pic: 'demo.jpg',
        thumbnails: 'thumbnails.jpg'
    },
    subtitle: {
        url: 'webvtt.vtt'
    },
    danmaku: {
        id: 'demo',
        api: 'http://localhost:3000/dplayer/'
    }
});

Test Server Address

The stability of the Barrage data is not currently used with caution

目前不保证弹幕数据的稳定性 慎用!

http://api.22333.fun/dplayer/

TodoList

  • Database initialization

  • How to run the test suite

  • Services (job queues, cache servers, search engines, etc.)

  • Deployment instructions

  • ...