Sound when data is changed

I’m trying to make bubble make a noise when a piece of data is changed. Can anyone tell me if this is possible and if so how? Thank you!

Hello, you can do that with Javascript.

1- Go to plugins > add new plugin > components
2- Go to settings > General > Search for “Expose the option to add an ID attribute to HTML elements” and check the box
3- Draw Javascript element to the page
4- Draw a HTML element to the page.

  • 4.1- Set not visible on load page to html element.
  • 4.2- Scroll down and set in ID attribute: an unique id like music
  • 4.3- Scroll up and copy paste this html code:
    <audio id="music" src="https://puu.sh/yZsuA/20639a07ae.wav"> </audio>
    where id=“music” set the ID attribute you put before in step 4.2
    you can change the beep sound in the src=“link.wav”

5- Go to workflow create an event (like on page load) or whatever.
6- Create new workflow > Element actions > Javascript

  • 6.1- Copy and paste this script:
    document.getElementById('music').play();
    Where ‘music’ set the ID attribute you put in the step 4.2 and 4.3

You ready :wink:

Here’s the link to app too if you missing something.

Link to live: https://playautosound.bubbleapps.io/version-test?debug_mode=true
Link to editor: https://bubble.io/page?name=index&id=playautosound&tab=tabs-1

1 Like

Btw @wafflezplayz439 i see you deleting your message where you asking why it doesn’t repeat.

Yeah that one doesn’t repeat. If you want make a repeating sound then you should add this to the HTML code (inside the HTML element).

<audio id=“music” loop src=“https://puu.sh/yZsuA/20639a07ae.wav”>

Regards.

1 Like

Thanks

Hi, I’ve been using that for awhile and thanks for it! But i’ve realized that it only plays once per refresh. As in the data is changed sound plays. But it wont play again if it matches the conditions unless you refresh the page. Thank you!

You need to mark your condition “every time”.

1 Like

I’m sorry, but I don’t understand what condition you are talking about?

Show me your condition workflow (or how you are triggering the sound).
Post a screenshoot.

1 Like

https://gyazo.com/e24f19811045e1e939981c2494f12999

I was refering to this:
https://puu.sh/zGifc/40d6d0cc31.png

Show me that event in the editor window

1 Like

Ah, got it. Cheers :wink:

So i figure you found the “Every time” action in the event :slight_smile:

Yep, and it wouldn’t be a real issue if another issue came up after :roll_eyes: . Now i’m having the issue where only I hear the noise. No one else does.

Then you should check your condition configuration. If only you are hearing the noise, its because the condition its triggering only to you.

https://gyazo.com/cf01524f715032cf6dd4513557a7ceec

Would it be in these conditions? If so, whats wrong with it.