Skip to content

Commit

Permalink
fix(frontend): 画面表示後最初の音声再生が爆音になることがある問題を修正 (misskey-dev#13379)
Browse files Browse the repository at this point in the history
* fix(frontend): 画面表示後最初の音声再生が爆音になることがある問題を修正

* Update CHANGELOG.md

* Update CHANGELOG.md
  • Loading branch information
zyoshoka authored and takaion committed May 11, 2024
1 parent 45c3a65 commit 7b3115e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

## 202x.x.x (Unreleased)

## 2024.2.0-mk2
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正 (cheery picked from misskey-dev/misskey)
- Fix: 画面表示後最初の音声再生が爆音になることがある問題を修正 (cheery picked from misskey-dev/misskey)

## 2024.2.0-mk1
- 2023.12.0-mk3 + 2024.2.0

Expand All @@ -36,11 +40,6 @@
## 2023.12.0-mk1
- enhance: ホーム・フォロワー限定・ダイレクトのノートの背景に色をつける処理を追加

## 202x.x.x (unreleased)

### Client
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正

## 2024.2.0

### Note
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/scripts/sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export async function loadAudio(url: string, options?: { useCache?: boolean; })
*/
export function playMisskeySfx(operationType: OperationType) {
const sound = defaultStore.state[`sound_${operationType}`];
if (sound.type == null || !canPlay) return;
if (sound.type == null || !canPlay || !navigator.userActivation.hasBeenActive) return;

canPlay = false;
playMisskeySfxFile(sound).finally(() => {
Expand Down

0 comments on commit 7b3115e

Please sign in to comment.