# nativeAudio

**URL:** <https://forum.ionicframework.com/t/nativeaudio/134937>\
**Category:** Ionic Native\
**Created:** [July 11, 2018, 12:16am UTC](https://forum.ionicframework.com/t/nativeaudio/134937 "2018-07-11T00:16:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffersonbb](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jeffersonbb/32/119857_2.png) [@jeffersonbb](https://forum.ionicframework.com/u/jeffersonbb)\
**Post date:** [July 11, 2018, 12:16am UTC](https://forum.ionicframework.com/t/nativeaudio/134937/1 "2018-07-11T00:16:34Z")

</div>

Sorry for the basic question but I’m not finding how to do it, it does not have to do for me, but at least specify where I can learn how to do it.

I have a screen with several buttons and clicking on each button will have to be “played” an mp3 file, will be several, an audio I got, now I do not know where to look to have an audio for each button

```auto
<ion-content padding>
    <p> 
      <ion-title color="dark">INICIADOS COM B</ion-title>
        <ion-grid>
          <ion-row align-items-center>
            <ion-col><button ion-button block outline (click)="play()">bō</button></ion-col>
            <ion-col><button ion-button block outline >bó</button></ion-col>
            <ion-col><button ion-button block outline >bǒ</button></ion-col>
            <ion-col><button ion-button block outline >bò</button></ion-col>
          </ion-row>

```

![image](https://global.discourse-cdn.com/ionicframework/original/3X/2/c/2c1ebbc332f5e35f97d982039866d8d2e53cdb98.png)

```auto
  constructor(public navCtrl: NavController, 
              public navParams: NavParams,
              public platform: Platform,
              private nativeAudio: NativeAudio) {
                
  
                this.platform.ready().then(() => {
                  this.nativeAudio.preloadSimple('uniqueId1', 'assets/audio/ang.mp3').then((success)=>{
                    console.log("Carregado com Sucesso");
                  },(error)=>{
                    console.log(error);
                  });
                });
  
              }

              play(){
                this.nativeAudio.play('uniqueId1').then((success)=>{
                  console.log("Sucesso ao executar");
                },(error)=>{
                  console.log(error);
                });
              }

```

I will be very grateful if you give me the stones, I do not want the fish, but I need help to know how to fish

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:30pm UTC](https://forum.ionicframework.com/t/nativeaudio/134937/2 "2021-07-19T21:30:08Z")

</div>

Closed on July 19, 2021, 9:30pm UTC


