Skip to content

Commit 622f954

Browse files
authored
fix: player volume bug (#1918)
* fix: player volume bug * Update Player.js * Update Player.js * Update Player.js * Update Player.js
1 parent 210e65d commit 622f954

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/Player.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default class {
146146
}
147147
set volume(volume) {
148148
this._volume = volume;
149-
Howler.volume(volume);
149+
this._howler?.volume(volume)
150150
}
151151
get list() {
152152
return this.shuffle ? this._shuffledList : this._list;
@@ -207,7 +207,7 @@ export default class {
207207

208208
_init() {
209209
this._loadSelfFromLocalStorage();
210-
Howler.volume(this.volume);
210+
this._howler?.volume(this.volume);
211211

212212
if (this._enabled) {
213213
// 恢复当前播放歌曲

0 commit comments

Comments
 (0)