mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 05:11:20 -08:00
添加isLive选项
This commit is contained in:
1 parent
df54606294
commit
5d286e5d00
7 files changed
+27
-13
No files matched your search
@@ -28,7 +28,7 @@ export default class Controls {
|
||||
this.add(
|
||||
progress({
|
||||
name: 'progress',
|
||||
disable: false,
|
||||
disable: option.isLive,
|
||||
position: 'top',
|
||||
index: 10,
|
||||
}),
|
||||
@@ -37,7 +37,7 @@ export default class Controls {
|
||||
this.add(
|
||||
thumbnails({
|
||||
name: 'thumbnails',
|
||||
disable: !option.thumbnails.url,
|
||||
disable: !option.thumbnails.url || option.isLive,
|
||||
position: 'top',
|
||||
index: 20,
|
||||
}),
|
||||
@@ -64,7 +64,7 @@ export default class Controls {
|
||||
this.add(
|
||||
time({
|
||||
name: 'time',
|
||||
disable: false,
|
||||
disable: option.isLive,
|
||||
position: 'left',
|
||||
index: 30,
|
||||
}),
|
||||
|
||||
@@ -75,6 +75,7 @@ class Artplayer extends Emitter {
|
||||
title: '',
|
||||
theme: '#f00',
|
||||
volume: 0.7,
|
||||
isLive: false,
|
||||
muted: false,
|
||||
autoplay: false,
|
||||
autoSize: false,
|
||||
|
||||
@@ -11,8 +11,11 @@ export default class Plugins {
|
||||
this.add(subtitle);
|
||||
}
|
||||
|
||||
if (!art.option.isLive) {
|
||||
this.add(miniProgressBar);
|
||||
}
|
||||
|
||||
this.add(localPreview);
|
||||
this.add(miniProgressBar);
|
||||
art.option.plugins.forEach(plugin => {
|
||||
this.add(plugin);
|
||||
});
|
||||
|
||||
+5
@@ -35,6 +35,11 @@ export default class Artplayer {
|
||||
*/
|
||||
volume?: number;
|
||||
|
||||
/**
|
||||
* Whether to live by default
|
||||
*/
|
||||
isLive?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to mute by default
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user