howler.js icon indicating copy to clipboard operation
howler.js copied to clipboard

Fix iOS control center notification in html5 mode

Open bikubi opened this issue 3 years ago • 11 comments

This is a fix for #1383. See commit message for how it works. I've ran all tests & examples successfully.

I've also fixed to build script to work on Linux. It still works on my Mac, too (current macOS, sed from 2017 -- should be fine, I guess).

bikubi avatar Nov 19 '21 10:11 bikubi

Any chance of getting this merged?

olliekav avatar Dec 17 '21 10:12 olliekav

I'm not able to merge this due to the distribution files being modified. However, I'm still seeing issues with the control center with these changes. Still doing some digging.

goldfire avatar Dec 19 '21 23:12 goldfire

  • I'm happy to remove the build artifacts from the PR, I simply wasn't aware of your contribution procedure
  • What are the issues you're still seeing? I'm curious for my use case and maybe I can help with the digging.

bikubi avatar Dec 20 '21 11:12 bikubi

  • I'm happy to remove the build artifacts from the PR, I simply wasn't aware of your contribution procedure
  • What are the issues you're still seeing? I'm curious for my use case and maybe I can help with the digging.

No worries! I need to get around to setting up the guidelines on that through GitHub's contributor features. The build happens when when a new npm version goes out, so no need to do that in the PR.

It might be a separate issue, but if you pause in the control center and then play again the audio can't be heard until you play directly through howler again.

goldfire avatar Dec 20 '21 17:12 goldfire

@goldfire @bikubi any status of the merging of this? Would be great if it solved the issue!

emilsaj avatar Mar 02 '22 07:03 emilsaj

@bikubi Thanks for putting up this PR and for your comments on the related issues.

I was excited to discover this PR, and I found that it gets the media back into the control center! However, I'm running into the same bug that @goldfire describes:

if you pause in the control center and then play again the audio can't be heard until you play directly through howler again.

Your comment on #1262 appears to be related, but that's not fixing the issue for me.

It appears to me that once the audio is paused, the MediaSession isn't firing the play event at all.

curthipster avatar Mar 12 '22 00:03 curthipster

@goldfire I put together a simple player page that can be used to test the mobile lock screen and control center controls. Once I added in code to configure and handle MediaSession events, I'm not seeing the bugs anymore in my manual tests in this branch. Right now, the code is in the test player, but I wonder if it's a feature that you've considered adding directly to the library?

Can you advise on how best to put up a PR for you to review? One path would be to put up a PR with just the tests, which demonstrate that the controls are not working in the main branch. And then if you rebase this PR onto that, you'll see that they are. Another path would be to put up a PR against this PR branch, but it's not clear to me that I have permission to do that in this repo.

curthipster avatar Mar 14 '22 16:03 curthipster

@goldfire @bikubi any status update for the merging of this? Facing the same issue of control center notification not appearing in ios. Thanks in advance.

srividya-sharma avatar Apr 18 '22 13:04 srividya-sharma

@goldfire the issues with iOS is still a bother. Can we merge the fix?

satyrius avatar Oct 03 '22 21:10 satyrius

@goldfire the issues with iOS is still a bother. Can we merge the fix?

Hi. I had forked this lib and merged a few urgent PRs. If you want, make a pr to https://github.com/profispojka/loudest and you will soon find the changes in https://www.npmjs.com/package/loudest

profispojka avatar Oct 28 '22 15:10 profispojka

Is there any news on merging this @goldfire ? 🤞 I am using the use-sound library which uses howler and have no idea if and how I could fix this manually myself else I would. Even if it is not a full fix, it does not feel like it breaks anything and is a nice addition?

heijntje avatar Nov 23 '23 14:11 heijntje