# Playing mp3 Audio

**URL:** <https://discourse.nodered.org/t/playing-mp3-audio/8188>\
**Category:** General\
**Created:** [20 February 2019 14:46 UTC](https://discourse.nodered.org/t/playing-mp3-audio/8188 "2019-02-20T14:46:38Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [21 February 2019 23:10 UTC](https://discourse.nodered.org/t/playing-mp3-audio/8188/11 "2019-02-21T23:10:41Z")

</div>

Hey Mecky,

Have tested it with following flow, which downloads an mp3 from the web and plays it in the browser:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/88f5700fde01f88bf84f1ea5b6f1e756e0aa9405.png)

```auto
[{"id":"2a8146bc.01fa8a","type":"http request","z":"47b91ceb.38a754","name":"Download m3","method":"GET","ret":"bin","url":"https://www.thesoundarchive.com/email/mp_grail.mp3","tls":"","x":1260,"y":160,"wires":[["b4e7058c.12e0d8"]]},{"id":"7e9367c2.5c3018","type":"inject","z":"47b91ceb.38a754","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1070,"y":160,"wires":[["2a8146bc.01fa8a"]]},{"id":"b4e7058c.12e0d8","type":"ui_audio","z":"47b91ceb.38a754","name":"","group":"16a1f12d.07c69f","voice":"0","always":true,"x":1460,"y":160,"wires":[]},{"id":"ca47e138.e7016","type":"comment","z":"47b91ceb.38a754","name":"Play mp3 in dashboard","info":"","x":1100,"y":120,"wires":[]},{"id":"fb9523fe.0686d","type":"http request","z":"47b91ceb.38a754","name":"Download m3","method":"GET","ret":"bin","url":"https://www.thesoundarchive.com/email/mp_grail.mp3","tls":"","x":1260,"y":260,"wires":[["4b104bb8.b27cd4"]]},{"id":"9fa09162.6a45b","type":"inject","z":"47b91ceb.38a754","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1070,"y":260,"wires":[["fb9523fe.0686d"]]},{"id":"f9554a1d.16f3d8","type":"comment","z":"47b91ceb.38a754","name":"Play mp3 in flow editor","info":"","x":1100,"y":220,"wires":[]},{"id":"4b104bb8.b27cd4","type":"play audio","z":"47b91ceb.38a754","name":"","voice":"","x":1470,"y":260,"wires":[]},{"id":"16a1f12d.07c69f","type":"ui_group","z":"","name":"Default","tab":"f136a522.adc2a8","order":1,"disp":true,"width":"6"},{"id":"f136a522.adc2a8","type":"ui_tab","z":"","name":"Home","icon":"home","order":1}]

```

I run Node-RED on a Raspberry PI 3 model B and did the tests in browsers on Windows 10. It works fine in Chrome/Firefox/Edge both for flow editor and dashboard. So **6 tests** in total ...

A couple of remarks:

- The output of my http-request node is binary buffer. Don't convert audio or video anywhere to strings ...
- In the audio-out node I have selected the checkbox '_Play audio when window not in focus_, because it won't play otherwise when the tab (where you have added your audio-out node) isn't visible at the moment ...

---

_[View the full topic](https://discourse.nodered.org/t/playing-mp3-audio/8188)._
