Video Test

Example_I-Don't-Know-the-Actual-Language
1
2
3
4
5
6
7
8
dplayer options:
'autoplay', 'loop', 'screenshot', 'hotkey', 'mutex', 'dmunlimited' : bool options, use "yes" "y" "true" "1" "on" or just without value to enable
'preload', 'theme', 'lang', 'logo', 'url', 'pic', 'thumbnails', 'vidtype', 'suburl', 'subtype', 'subbottom', 'subcolor', 'subcolor', 'id', 'api', 'token', 'addition', 'dmuser' : string arguments
'volume', 'maximum' : number arguments
container options:
'width', 'height' : string, used in container element style
other:
'code' : value of this key will be append to script tag
Example_I-Don't-Know-the-Actual-Language
1
2
{% dplayer "url=https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.mp4" "addition=https://dplayer.daoapp.io/bilibili?aid=4157142" "api=https://api.prprpr.me/dplayer/" "pic=https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.jpg" "id=9E2E3368B56CDBB4" "loop=yes" "theme=#FADFA3" "autoplay=false" "token=tokendemo" %}
{% dplayer 'url=some.mp4' "id=someid" "api=https://api.prprpr.me/dplayer/" "addition=/some.json" 'code=player.on("loadstart",function(){console.log("loadstart")})' "autoplay" %}
Raw-Dplayer_Example_I-Don't-Know-the-Actual-Language
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{% raw %}
<div id="dplayer" className="dplayer"></div>
<link class="dplayer-css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
<script>
var dp = new DPlayer({
container: document.querySelector('#dplayer'),
autoplay: false,
theme: '#FADFA3',
loop: true,
screenshot: true,
hotkey: true,
logo: 'logo.png',
volume: 0.7,
mutex: true,
video: {
url: 'demo.mp4',
pic: 'demo.png',
thumbnails: 'thumbnails.jpg',
type: 'auto'
},
subtitle: {
url: 'webvtt.vtt',
type: 'webvtt',
fontSize: '25px',
bottom: '10%',
color: '#b7daff'
},
danmaku: {
id: 'demo',
api: 'https://api.prprpr.me/dplayer/',
token: 'demo',
maximum: 3000,
user: 'DIYgod',
margin: {
bottom: '15%'
},
unlimited: true
},
contextmenu: [
{
text: 'custom contextmenu',
link: 'https://github.com/MoePlayer/DPlayer'
}
]
});
</script>
{% endraw %}