wle8300 / uifx

Audio library designed for UI sound effects
https://wle8300.github.io/uifx-demo
MIT License
112 stars 11 forks source link

iOS UIfx says: "had a problem ..." for autoplay #23

Closed Krakof closed 4 years ago

Krakof commented 4 years ago

Hi, Could you please help me with this issue: https://codesandbox.io/s/gifted-sinoussi-pvco6

My goal is to play notification sound on event(new article arrived)

Found iOS Safari Chrome Only autoplaying sound Thanks in advance

Krakof commented 4 years ago

@wle8300 Sorry, could you please explain why you closed the issue w/o any notes may be I missed smth?

wle8300 commented 4 years ago

What’s your bug/feature that you’re requesting?

Sent from my iPhone

On Jun 17, 2020, at 9:28 AM, Krakof notifications@github.com wrote:

@wle8300 Sorry, could you please explain why you closed the issue w/o any notes may be I missed smth?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Krakof commented 4 years ago

How can I play audio signal w/o user interaction e.g. when get new order?

import bell from "./file.mp3"
let tick = new UIfx(bell)
...
componentDidUpdate() {
  if (hasNewSound) {
     tick = new UIfx(newSoundLink)
  }

  if (hasNewOrder) {
      tick.play()
  }
}

It doesn't work at iOS Safari or Chrome: UIfx says: "had a problem ...". But if I have a button which user can click everything is ok Thanks in advance

wle8300 commented 4 years ago

If you visit this page on your phone, do the sounds play?

http://www.wle8300.com/uifx-demo/

Sent from my iPhone

On Jun 17, 2020, at 12:37 PM, Krakof notifications@github.com wrote:

How can I play audio signal w/o user interaction e.g. when get new order?

import bell from "./file.mp3" let tick = new UIfx(bell) ... componentDidUpdate() { if (hasNewSound) { tick = new UIfx(newSoundLink) }

if (hasNewOrder) { tick.play() } } It doesn't work at iOS Safari or Chrome: UIfx says: "had a problem ...". But if I have a button which user can click everything is ok Thanks in advance

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Krakof commented 4 years ago

iPhone

  1. yes
  2. no

Android both yes

Anyway I need to play sound w/o user interaction is it possible with your library?

wle8300 commented 4 years ago

Have you read the docs?

Sent from my iPhone

On Jun 17, 2020, at 1:18 PM, Krakof notifications@github.com wrote:

iPhone

yes no Android all yes Anyway I need to play sound w/o user interaction is it possible with your library?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Krakof commented 4 years ago

Yes, that's the problem, I didn't get the result that I expected. Can you please check the link I posted above. Sound does not play

jasonejavier commented 3 years ago

Same issue here