refactor: Simplify thumbnails implementation in Artplayer

This commit is contained in:
Harvey Zack committed 2024-08-15 23:08:33 +08:00
1 parent 3e3b38fe07
commit 65b0b2c53f
5 files changed
+17 -41

No files matched your search

+5 -8
View File
@@ -8,7 +8,6 @@ import progress from './progress';
import time from './time';
import volume from './volume';
import setting from './setting';
import thumbnails from './thumbnails';
import screenshot from './screenshot';
import airplay from './airplay';
@@ -81,13 +80,11 @@ export default class Control extends Component {
);
}
this.add(
thumbnails({
name: 'thumbnails',
position: 'top',
index: 20,
}),
);
this.add({
name: 'thumbnails',
position: 'top',
index: 20,
});
this.add(
playAndPause({
@@ -1,8 +0,0 @@
export default function thumbnails(options) {
return (art) => ({
...options,
mounted: () => {
art.thumbnails = art.options.thumbnails;
},
});
}