fix autoplay mse video
This commit is contained in:
+9
-8
@@ -121,14 +121,15 @@ function initPlayers () {
|
||||
// });
|
||||
|
||||
// // dp4
|
||||
// window.dp4 = new DPlayer({
|
||||
// container: document.getElementById('dplayer4'),
|
||||
// preload: 'none',
|
||||
// video: {
|
||||
// url: 'https://moeplayer.b0.upaiyun.com/dplayer/hls/hikarunara.m3u8',
|
||||
// type: 'hls'
|
||||
// }
|
||||
// });
|
||||
window.dp4 = new DPlayer({
|
||||
container: document.getElementById('dplayer4'),
|
||||
preload: 'none',
|
||||
autoplay: true,
|
||||
video: {
|
||||
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hls/hikarunara.m3u8',
|
||||
type: 'hls'
|
||||
}
|
||||
});
|
||||
|
||||
// // dp5
|
||||
// window.dp5 = new DPlayer({
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dplayer",
|
||||
"version": "1.18.0",
|
||||
"version": "1.18.1",
|
||||
"description": "Wow, such a lovely HTML5 danmaku video player",
|
||||
"main": "dist/DPlayer.min.js",
|
||||
"style": "dist/DPlayer.min.css",
|
||||
|
||||
@@ -230,7 +230,7 @@ class Controller {
|
||||
hide () {
|
||||
this.player.container.classList.add('dplayer-hide-controller');
|
||||
this.player.setting.hide();
|
||||
this.player.comment.hide();
|
||||
this.player.comment && this.player.comment.hide();
|
||||
}
|
||||
|
||||
isShow () {
|
||||
|
||||
+6
-6
@@ -126,6 +126,12 @@ class DPlayer {
|
||||
|
||||
this.time = new Time(this);
|
||||
|
||||
this.hotkey = new HotKey(this);
|
||||
|
||||
this.contextmenu = new ContextMenu(this);
|
||||
|
||||
this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type);
|
||||
|
||||
if (!this.danmaku) {
|
||||
// autoplay
|
||||
if (this.options.autoplay && !utils.isMobile) {
|
||||
@@ -136,12 +142,6 @@ class DPlayer {
|
||||
}
|
||||
}
|
||||
|
||||
this.hotkey = new HotKey(this);
|
||||
|
||||
this.contextmenu = new ContextMenu(this);
|
||||
|
||||
this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type);
|
||||
|
||||
index++;
|
||||
instances.push(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user