弹幕同步视频播放速度功能

This commit is contained in:
Harvey Zack committed 2019-05-06 15:06:52 +08:00
1 parent 92893321b2
commit 952b66898a
10 files changed
+138 -53

No files matched your search

+12 -2
View File
@@ -38,13 +38,22 @@ var art = new Artplayer({
container: '.artplayer-app',
url: 'path/to/video.mp4',
plugins: [artplayerPluginDanmuku({
danmuku: [], // Can be an array or return the promised function or danmuku xml url
danmuku: [
{
text: '666', // Danmu text
time: 5, // Video time
color: '#fff', // Danmu color
border: false, // Danmu border
mode: 'scroll', // Danmu mode: scroll or static
}
], // Can be an array or return the promised function or danmuku xml url
speed: 5, // Animation time
opacity: 1, // Opacity
color: '#fff', // Font color
size: 25, // Font size
maxlength: 50, // The maximum number of words in the danmu
margin: [10, 20], // Margin top and margin bottom
synchronousPlayback: false, // Synchronous playback speed
})],
});
@@ -54,7 +63,8 @@ art.plugins.artplayerPluginDanmuku.emit({
time: 5, // Video time
color: '#fff', // Danmu color
size: 25, // Danmu size
border: false // Danmu border
border: false, // Danmu border
mode: 'scroll', // Danmu mode: scroll or static
});
// Hide danmu