mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
update mobile demo
This commit is contained in:
1 parent
2cb73141fb
commit
893f77ba08
2 files changed
+13
-2
No files matched your search
+7
-2
@@ -64,6 +64,7 @@
|
|||||||
setting: true,
|
setting: true,
|
||||||
flip: true,
|
flip: true,
|
||||||
lock: true,
|
lock: true,
|
||||||
|
autoSize: true,
|
||||||
fastForward: true,
|
fastForward: true,
|
||||||
playbackRate: true,
|
playbackRate: true,
|
||||||
aspectRatio: true,
|
aspectRatio: true,
|
||||||
@@ -163,10 +164,14 @@
|
|||||||
mount: document.querySelector('.danmuku-input'),
|
mount: document.querySelector('.danmuku-input'),
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
}, function () {
|
|
||||||
this.autoHeight = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 移动端默认不会预加载数据,所以不会默认触发 ready 事件
|
||||||
|
// 但这里可监听 loadedmetadata 事件,自动适应高度
|
||||||
|
art.on('video:loadedmetadata', () => {
|
||||||
|
art.autoHeight = true;
|
||||||
|
})
|
||||||
|
|
||||||
Artplayer.config.events.forEach(function (item) {
|
Artplayer.config.events.forEach(function (item) {
|
||||||
art.on('video:' + item, function (event) {
|
art.on('video:' + item, function (event) {
|
||||||
console.log('video: ' + event.type);
|
console.log('video: ' + event.type);
|
||||||
|
|||||||
@@ -136,6 +136,12 @@
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 移动端默认不会预加载数据,所以不会默认触发 ready 事件
|
||||||
|
// 但这里可监听 loadedmetadata 事件,自动适应高度
|
||||||
|
art.on('video:loadedmetadata', () => {
|
||||||
|
art.autoHeight = true;
|
||||||
|
})
|
||||||
|
|
||||||
Artplayer.config.events.forEach(function (item) {
|
Artplayer.config.events.forEach(function (item) {
|
||||||
art.on('video:' + item, function (event) {
|
art.on('video:' + item, function (event) {
|
||||||
console.log('video: ' + event.type);
|
console.log('video: ' + event.type);
|
||||||
|
|||||||
Reference in new issue
Block a user