Uploading & playing audio files

Hi…

Not sure why I can’t figure this out. Trying to upload & be able to selectively play mp3 files within the app. I have the file picker and am able to upload them to a table (saved as a URL type). I found the audio component and have placed it on the app.

What seems so simple is I want to have a list of the various mp3’s I’ve uploaded on the page, and be able to click on them and have them play. They’re going to be used for a historic audio walk with a group for whom I work.

I just can’t associate the file mp3 location with the player. What am I missing?

Thanks.

Jim Spellos

Do your users sign in, or is it a public app?

Essentially you want to set up your collection to write the selected url to a single row table or somewhere where that audio component is always looking for the url in the same location. Every time they make a selection it should update the url and then they can play the selected audio.

Another alternative is a custom collection with an audio component inside the custom collection.

Another alternative is to use crate a custom AI component that plays audio. A bit more work to get it working correctly, and you would probably have to generate JSON to pass into it, but I imagine it would be possible.

Hi Jeff…

Thanks for the quick response. The app is a private app with sign in.

We want to have multiple mp3 files that can be listened at various times, so I’m not certain a single row table would work. Could it work as a list in a collection, iterating through the rows?

Intrigued by the custom AI component idea. Hadn’t thought about that, but will give it a try as well.

Really appreciate your help.

Jim

Yes, it would still work, because that single row would receive the url of the selected file from a collection when they click on it. Your audio component would only point to that single row table and the url dynamically changes based on the user’s selection. But since you’re users are signed in, it’s a little easier and you can actually use the user profile row to receive the url. Change the action on your collection to a Set Column action that writes the url to a column in the user table through the user profile. Then point your audio component directly to the user profile column.

Another alternative would be to use a choice component to select an audio file, and point the audio component to the column that the choice component writes to.

Hi Jeff…

Got it! Thanks so much. Btw, I tried the AI builder, and it came close to working, but I couldn’t get it to upload the file. Still, good to explore further in that space.

Appreciate your help.

Jim

1 Like

If you have them as different rows in a table, I think this approach works best.

The only note is that they won’t autoplay the next audio, unless you find a way to do something with an AI component.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.