# A button to play music?

**URL:** <https://community.glideapps.com/t/a-button-to-play-music/31461>\
**Category:** Ask for Help\
**Created:** [September 6, 2021, 7:42pm UTC](https://community.glideapps.com/t/a-button-to-play-music/31461 "2021-09-06T19:42:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Turrell](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark_turrell/32/26605_2.png) [@Mark\_Turrell](https://community.glideapps.com/u/Mark_Turrell)\
**Post date:** [September 6, 2021, 7:42pm UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/1 "2021-09-06T19:42:28Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Mark\_Turrell](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark_turrell/32/26605_2.png) [@Mark\_Turrell](https://community.glideapps.com/u/Mark_Turrell)\
**Post date:** [September 6, 2021, 8:03pm UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/2 "2021-09-06T20:03:43Z")

</div>

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…

````auto
<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>
```´
````

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [September 6, 2021, 9:53pm UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/3 "2021-09-06T21:53:56Z")

</div>

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

> [@I really miss the option to autoplay video in the media component](https://community.glideapps.com/t/i-really-miss-the-option-to-autoplay-video-in-the-media-component/31390):
>
> I’m struggling with videos for a new app (finally me too crazy_face) and I’ve a question: why the video component do not allow autoplay? Do I have to make a beastly effort to implement a webview (and other boring things) just to obtain the autoplay? thinking Can any of you guys, who have run into this problem before, suggest me another way to go on? I need in the detail screen: autoplay video use a video player that does not take out of the APP Many thanks to those who want to help me. …

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [September 6, 2021, 10:03pm UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/4 "2021-09-06T22:03:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AlvinM](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alvinm/32/40286_2.png) [@AlvinM](https://community.glideapps.com/u/AlvinM)\
**Post date:** [May 14, 2022, 6:43am UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/6 "2022-05-14T06:43:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 14, 2022, 11:02pm UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/7 "2022-05-14T23:02:43Z")

</div>

> [@Anything better than the audio component?](https://community.glideapps.com/t/anything-better-than-the-audio-component/30243/8):
>
> Do you have a visualized example of what you are looking for?

---

<div class="post-metadata">

**Author:** ![AlvinM](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alvinm/32/40286_2.png) [@AlvinM](https://community.glideapps.com/u/AlvinM)\
**Post date:** [May 14, 2022, 11:53pm UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/8 "2022-05-14T23:53:54Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/5/b5712aeeeaa444ce6726630199d63965cbbbb6a4.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 16, 2022, 12:01am UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/9 "2022-05-16T00:01:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AlvinM](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alvinm/32/40286_2.png) [@AlvinM](https://community.glideapps.com/u/AlvinM)\
**Post date:** [May 16, 2022, 3:27am UTC](https://community.glideapps.com/t/a-button-to-play-music/31461/10 "2022-05-16T03:27:12Z")

</div>

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!
