mirror of
https://github.com/DIYgod/DPlayer
synced 2024-11-22 18:56:54 +00:00
.github | ||
demo | ||
dist | ||
src | ||
webpack | ||
.eslintrc | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
package.json | ||
README.md | ||
yarn.lock |
DPlayer
Wow, such a lovely HTML5 danmaku video player
Introduction
DPlayer is a lovely HTML5 danmaku video player to help people build video and danmaku easily.
DPlayer supports:
- Streaming formats
- HLS
- FLV
- MPEG DASH
- WebTorrent
- Any other custom streaming formats
- Media formats
- MP4 H.264
- WebM
- Ogg Theora Vorbis
- Features
- Danamku
- Screenshot
- Hotkeys
- Quality switching
- Thumbnails
- Subtitle
Using DPlayer on your project? Let me know!
Install
$ npm install dplayer --save
Quick Start
<link rel="stylesheet" href="dist/DPlayer.min.css">
<div id="player1"></div>
<script src="dist/DPlayer.min.js"></script>
var dp = new DPlayer({
element: document.getElementById('player1'),
video: {
url: 'dplayer.mp4',
pic: 'dplayer.png'
},
danmaku: {
id: 'testid',
api: 'https://api.prprpr.me/dplayer/'
}
});
Usage
CDN
FAQ
Why can't some videos be full screen?
If player is contained in a iframe, try adding the allowfullscreen attribute to the iframe.
For full browser support it should look like this:
<iframe src="example.com"
allowfullscreen="allowfullscreen"
mozallowfullscreen="mozallowfullscreen"
msallowfullscreen="msallowfullscreen"
oallowfullscreen="oallowfullscreen"
webkitallowfullscreen="webkitallowfullscreen"></iframe>
Why can't player autoplay in some mobile browsers?
Most mobile browsers forbid video autoplay, you wont be able to achieve it without hacks.
Join the Discussion
- Telegram Group
- QQ Group: 415835947
Related Projects
- DPlayer-backend
- DPlayer-data(weekly backup for api.prprpr.me/dplayer)
- DPlayer-thumbnails
- DPlayer-for-typecho
- Hexo-tag-dplayer
- DPlayer_for_Z-BlogPHP
- 纸飞机视频区插件(DPlayer for Discuz!)
- DPlayer for WordPress
- Vue-DPlayer
- react-dplayer
- DPlayer-Lite
- DPlayerHandle
- laravel-danmaku
- dplayer-live-backend
- Feel free to submit yours in
Let me know!
Who use DPlayer?
- 嘀哩嘀哩
- 银弹字幕组
- 纸飞机南航青年网络社区
- otomads
- Feel free to submit yours in
Let me know!
Donate
- Donate via OpenCollective
- Donate via Paypal
- Donate via WeChat Pay
- Donate via Alipay
- Donate via Bitcoin: 13CwQLHzPYm2tewNMSJBeArbbRM5NSmCD1
Sponsors
Thank you to all our sponsors!
Contributors
This project exists thanks to all the people who contribute.
Backers
Thank you to all our backers!
Author
DPlayer © DIYgod, Released under the MIT License.
Authored and maintained by DIYgod with help from contributors (list).
Blog · GitHub @DIYgod · Twitter @DIYgod · Telegram Channel @awesomeDIYgod