mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 19:51:20 -08:00
add tooltip
This commit is contained in:
1 parent
8a88fb3043
commit
9aa2bf1588
11 files changed
+64
-25
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { append } from '../utils';
|
||||
import { append, tooltip } from '../utils';
|
||||
import icons from '../icons';
|
||||
|
||||
export default class PlayAndPause {
|
||||
@@ -12,10 +12,12 @@ export default class PlayAndPause {
|
||||
}
|
||||
|
||||
init() {
|
||||
const { events: { proxy }, player } = this.art;
|
||||
const { events: { proxy }, player, i18n } = this.art;
|
||||
|
||||
this.$play = append(this.option.$control, icons.play);
|
||||
this.$pause = append(this.option.$control, icons.pause);
|
||||
tooltip(this.$play, i18n.get('Pause'));
|
||||
tooltip(this.$pause, i18n.get('Play'));
|
||||
this.$pause.style.display = 'none';
|
||||
|
||||
proxy(this.$play, 'click', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { append, setStorage, getStorage, clamp } from '../utils';
|
||||
import { append, setStorage, getStorage, clamp, tooltip } from '../utils';
|
||||
import icons from '../icons';
|
||||
|
||||
export default class Volume {
|
||||
@@ -13,11 +13,12 @@ export default class Volume {
|
||||
}
|
||||
|
||||
init() {
|
||||
const { events: { proxy }, player } = this.art;
|
||||
const { events: { proxy }, player, i18n } = this.art;
|
||||
this.$volume = append(this.option.$control, icons.volume);
|
||||
this.$volumeClose = append(this.option.$control, icons.volumeClose);
|
||||
this.$volumePanel = append(this.option.$control, '<div class="art-volume-panel"></div>');
|
||||
this.$volumeHandle = append(this.$volumePanel, '<div class="art-volume-slider-handle"></div>');
|
||||
tooltip(this.$volume, i18n.get('Mute'));
|
||||
this.$volumeClose.style.display = 'none';
|
||||
|
||||
const volume = getStorage('volume');
|
||||
|
||||
Reference in new issue
Block a user