Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): Android環境で通知音量を0にしても音が鳴っているかのように振る舞う問題の修正 #11281

Merged
merged 1 commit into from
Jul 15, 2023

Conversation

yutaro
Copy link
Contributor

@yutaro yutaro commented Jul 14, 2023

What

#6096
Android 環境で通知音量を0にしても音が鳴っているかのように振る舞う問題の修正

MasterVolumeが0の時だけでなく各通知音の音量設定が0のときも、HTMLAudioElement.playが実行されないように変更

Why

Youtubeをバックグラウンド再生しながらmisskeyを使っていたら再現できた
下記の状況で新しいNoteが投稿されるとYoutubeの音量が一時的に(1秒程度)下がる

  • MasterVolume > 0
  • NoteVolume == 0

audio.play()時にvolumeが0であってもAndroidの音声フォーカスがYoutubeからMisskeyに移ることが原因なのではないかと推測される
https://developer.android.com/guide/topics/media-apps/audio-focus?hl=ja

Additional info (optional)

手元のAndroid環境では上記の状況で音声フォーカスを取られなくなってそう。

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Jul 14, 2023
@yutaro yutaro changed the title fix-6096: Android環境で通知音量を0にしても音が鳴っているかのように振る舞う問題の修正 fix(frontend): issue 6096 Android環境で通知音量を0にしても音が鳴っているかのように振る舞う問題の修正 Jul 14, 2023
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #11281 (3e2c7e9) into develop (2b6dbd4) will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop   #11281      +/-   ##
===========================================
+ Coverage    77.71%   77.72%   +0.01%     
===========================================
  Files          171      739     +568     
  Lines        21555    70787   +49232     
  Branches       496     7233    +6737     
===========================================
+ Hits         16751    55018   +38267     
- Misses        4804    15769   +10965     

see 906 files with indirect coverage changes

@yutaro yutaro changed the title fix(frontend): issue 6096 Android環境で通知音量を0にしても音が鳴っているかのように振る舞う問題の修正 fix(frontend): Android環境で通知音量を0にしても音が鳴っているかのように振る舞う問題の修正 Jul 14, 2023
@syuilo syuilo merged commit 866e3f0 into misskey-dev:develop Jul 15, 2023
17 checks passed
@syuilo
Copy link
Member

syuilo commented Jul 15, 2023

👍

@yutaro yutaro deleted the fix-6096 branch July 15, 2023 05:07
slofp pushed a commit to Secineralyr/misskey.dream that referenced this pull request Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants