moeplayer / laravel-danmaku
DPlayer Danmaku For Laravel 5
v1.0
2018-07-05 18:51 UTC
Requires
- php: ^7.0
- illuminate/auth: ~5.5.0|~5.6.0
- illuminate/database: ~5.5.0|~5.6.0
Requires (Dev)
- phpunit/phpunit: ^5.7|^6.2
This package is not auto-updated.
Last update: 2024-05-17 21:21:24 UTC
README
Installation
You can install the package via composer:
composer require moeplayer/laravel-danmaku
Copy the package migration to your local migration with the publish command:
php artisan vendor:publish --tag danmaku
php artisan migrate
Add danmakuv2 to the csrf whitelist
// app\Http\Middleware\VerifyCsrfToken.php protected $except = [ 'danmakuv2' ];
Usage
const dp = new DPlayer({ container: document.getElementById('dplayer'), screenshot: true, video: { url: 'demo.mp4', pic: 'demo.jpg', thumbnails: 'thumbnails.jpg' }, danmaku: { id: 'demo', api: 'http://domain/danmakuv2', user: 'dog' } });