Skip to content

Commit

Permalink
🔧 Fixed to keep volume changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nich87 committed Dec 6, 2023
1 parent 3e82735 commit 1012438
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/classes/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class YTPlayer {
inputType: StreamType.WebmOpus,
inlineVolume: true
});
this.resource.volume?.setVolume(0.1);
this.resource.volume?.setVolume(this.volume);
this.connection.subscribe(this.player);
this.player.play(this.resource);
}
Expand All @@ -76,6 +76,7 @@ export class YTPlayer {

public changeVolume(volume: number): void {
if (!this.resource) return;
this.volume = volume;
this.resource.volume?.setVolume(volume / 10);
}

Expand Down

0 comments on commit 1012438

Please sign in to comment.