Skip to content

geekapk-r/laravel-danmaku

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Danmaku

GitHub license

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'
    }
});

Packages

No packages published

Languages

  • PHP 100.0%