fix: player volume bug (#1918)

* fix: player volume bug

* Update Player.js

* Update Player.js

* Update Player.js

* Update Player.js
master
タイムライン 2 years ago committed by GitHub
parent 210e65dd9a
commit 622f95439d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -146,7 +146,7 @@ export default class {
} }
set volume(volume) { set volume(volume) {
this._volume = volume; this._volume = volume;
Howler.volume(volume); this._howler?.volume(volume)
} }
get list() { get list() {
return this.shuffle ? this._shuffledList : this._list; return this.shuffle ? this._shuffledList : this._list;
@ -207,7 +207,7 @@ export default class {
_init() { _init() {
this._loadSelfFromLocalStorage(); this._loadSelfFromLocalStorage();
Howler.volume(this.volume); this._howler?.volume(this.volume);
if (this._enabled) { if (this._enabled) {
// 恢复当前播放歌曲 // 恢复当前播放歌曲

Loading…
Cancel
Save