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

Playing a sound #13

Closed
jonathanasquier opened this issue Jan 23, 2016 · 8 comments
Closed

Playing a sound #13

jonathanasquier opened this issue Jan 23, 2016 · 8 comments

Comments

@jonathanasquier
Copy link

Hey, I'm using a mp3 link in options.sound to play when the notification opens, but I can't get it to work.
Does it work on your side?
Am I missing something?

Thanks!

@georgeOsdDev
Copy link
Member

Hi @jonathanasquier
MDN say that Notification.sound is not supported in any browser yet.
https://developer.mozilla.org/en/docs/Web/API/notification/sound#Browser_compatibility

I think you can emulate notification sound like this solution
http://stackoverflow.com/questions/10105063/how-to-play-a-notification-sound-on-websites

playSound(){
  // See
  // http://stackoverflow.com/questions/10105063/how-to-play-a-notification-sound-on-websites
}

<Notification
    onShow={this.playSound.bind(this)}
...

georgeOsdDev pushed a commit that referenced this issue Jan 25, 2016
georgeOsdDev added a commit that referenced this issue Jan 25, 2016
@jonathanasquier
Copy link
Author

Awesome! thanks!

@vishnusivabalan
Copy link

Hi, is their any document-tutorial for this react-web-notification. i'm new to this.

Thanks.

@vishnusivabalan
Copy link

Thanks for your response, i need some document or tutorial for my better understanding of your code flow and structure.

@georgeOsdDev
Copy link
Member

This component is just 180 lines.

https://github.com/georgeOsdDev/react-web-notification/blob/master/src/components/Notification.js

I have no plans to write a tutorial.

@vishnusivabalan
Copy link

Okay Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants