A button to play music?

It might be easy but I am blanking right now…

Use case: while a customer is waiting to be connected to a video chat for their corona test, I would like them to opt-in to have some music being played. The benefit is that the hold music will stop once they are connected with an agent (due to visibility conditions - the agent app is connected to the user app, so an increment on one side passes through to the other device in around 15 seconds).

I explored autoplay in this community - but Chrome does not allow it.

I have re-thought through my requirement - and now I would like to give the customer the option to play music if they want. I would like them to click a button… then music just starts playing.

It should not open up the native Glide player… ideally the music plays when the button is clicked, and it will stop once the component is no longer visible.

Any ideas? Thanks!

This was a solution @PabloMFalero came up with a while ago - webview that will play music. It works to play music… but it does not start playing as soon as a button is clicked in Glide. There must be some cool trick I am missing…

<iframe src="https://v7player.wostreaming.net/854" type="audio/mp3" allow="autoplay" id="audio" style="display:none">
</iframe>
<audio autoplay>
    <source src="https://v7player.wostreaming.net/854" type="audio/mp3">
</audio>
```´
1 Like

see David’s answer here, this also applies to audioplay

1 Like

Mark, I think in of the backup apps it does autoplay…I’ll find it tomorrow

1 Like

is there a button to play audio? or a customize big button to play audio file? tnx.

1 Like

What I would is to have a button to play the audio/music. Instead of the small audio play button. Is this possible? Thanks.

1 Like

I believe at the moment the audio component is generated as a whole. It’s not easy to target each of the smaller components inside it to manipulate using CSS.

I would lean towards a custom solution using Github to generate a URI, then display it inside a webview component, but it would require a paid account.

1 Like

Thanks master @ThinhDinh, really appreciated your response.

I am still in the process of learning and creating draft app of Glide, but for sure soon will be on the paid account. Thanks!

1 Like