Sound Alerts Request

Basically the workflow is when the page is loaded, ‘A’ element is displayed, then the next action is to play the sound file.

Workflow: [when page loaded] = show element A --> set state of Music Player

I created a state called ‘mode’ that’s a text field. For the value I put in the "http://amazon.aws… " link that the file uploader gave me after I uploaded my sound file.

So, you’re saying that I have to put in a blank mp3 file, in the Music Player song file. OK I created a blank file and uploaded that as a static file (I uploaded it to the Music Player itself, not using the file uploader)

Just trying to explain what my steps are…

Is there something that I need to have on the ‘conditional’ tab of the Music Player?

I’ve been re-reading through the explanations trying to figure out what I’m missing because I still haven’t gotten this to work. @sridharan.s or anyone who can offer further insight, please?

Ahh I got it now! I think I was confused by the ‘set the dynamic link and reference to the state’ part!

I have this on my index page so my I created 2 states for the index page. In my workflow I have:

[when page loaded]= show element ‘A’ → set state of index to ‘blank.mp3 url’ → set state of index to ‘sound.mp3 url’

I also noticed that I hadn’t put in the http: in front of the s3.amazonaws url. I had it there before but forgot when I tried copying it again.

Then in the music player, I clicked on ‘Insert dynamic link’ and selected the page ‘index’s ‘state’’

Finally voilà!

Thanks @sridharan.s

2 Likes

Awesome! Glad you got it working.

Actually I do have one more question… Is there some way to get the sound playing on mobile? Right now it only plays on my computer but not on my phone.

You can use some JavaScript to make it work on both mobile and desktop.

Preview - https://nocodeassistant-tutorials.bubbleapps.io/version-test/notification_sound
Editor - https://bubble.io/page?type=page&name=notification_sound&id=nocodeassistant-tutorials&tab=tabs-1
Guide - https://nocodeassistant.com/adding-a-notification-sound/

5 Likes

@sharma.himanshu0608 thanks for your solution.

I am currently using the same method. The solution works as it should on desktop.

However I am facing some problems if I use this on iPad. If I apply the run.javascript to a simple button it works. If I connect it to a condition the workflow runs, but the sound is not playing.

As stated before this problem only occurs on iPad. I also tried to use a different browser, but it still is not working. I am sure that the workflow runs, because it also shows a popup.

Maybe you or some one else knows what’s the problem.

Thank you in advance for the help.

@maze is Javascript enabled in Safari?

1 Like

Good effort Samuel. If are a beginner in coding then you can take the help of an expert and make your app.

I’m trying to build something using the same concept. Is it possible to play music based on the current time and not click? And pull the music from a youtube playlist?