# Pausing or stopping an ongoing playback in node-red-contrib-play-sound

**URL:** <https://discourse.nodered.org/t/pausing-or-stopping-an-ongoing-playback-in-node-red-contrib-play-sound/72112>\
**Category:** General\
**Created:** [13 December 2022 09:21 UTC](https://discourse.nodered.org/t/pausing-or-stopping-an-ongoing-playback-in-node-red-contrib-play-sound/72112 "2022-12-13T09:21:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thepianocian](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@thepianocian](https://discourse.nodered.org/u/thepianocian)\
**Post date:** [13 December 2022 09:21 UTC](https://discourse.nodered.org/t/pausing-or-stopping-an-ongoing-playback-in-node-red-contrib-play-sound/72112/1 "2022-12-13T09:21:51Z")

</div>

Hi everyone. I am running into a weird issue. Using node-red-contrib-play-sound. For the player, I put {} because I don’t know what player to specify.

Anyway, when I inject the standard message, it’s fine and it plays the music I want it to play. However, when I send an inject for msg.payload = pause or msg.payload = stop, it does nothing. The documentation says that all I need to do is send those payloads to stop the ongoing playback, but it doesn’t work. It may look like it stopped on the Node Red flow/module view, but on the device itself the audio continues playing until completion.

Does anyone know why this would be the case? I tried sending the payload as a string, expression, and a few other data types to test it out but it just doesn’t work.

Similarly, I tried this with node-red-contrib-play-soundfile and it also doesn’t work following the guide there. Again, it shows that it stopped only on the flow view but in reality the music keeps playing.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2022 10:19 UTC](https://discourse.nodered.org/t/pausing-or-stopping-an-ongoing-playback-in-node-red-contrib-play-sound/72112/2 "2022-12-13T10:19:49Z")

</div>

first off, what device are you running NR on?  
What OS is it running/  
What version of NR and node.js (you can get these from the node-red startup log)

One other thing you could try is the `sox_play` node in the `node-red-contrib-sox-utils` collection.

On further looking I don’t think you can pause the sox\_play node

---

<div class="post-metadata">

**Author:** ![thepianocian](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@thepianocian](https://discourse.nodered.org/u/thepianocian)\
**Post date:** [19 December 2022 20:05 UTC](https://discourse.nodered.org/t/pausing-or-stopping-an-ongoing-playback-in-node-red-contrib-play-sound/72112/3 "2022-12-19T20:05:20Z")

</div>

Hello, thank you for the response but I finally found out how to do it for myself.

Just FYI in case anyone else finds this, I am running NodeRed 1.3.5 on an RPi 3B+.

My solution was to use PlaySound node but I had to shell out to "aplay" in order for the commands to work. The other players did not work.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/5/c57b97ce7d439750dcb1b724e1eadc2fd59ac440.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 January 2023 20:05 UTC](https://discourse.nodered.org/t/pausing-or-stopping-an-ongoing-playback-in-node-red-contrib-play-sound/72112/4 "2023-01-02T20:05:45Z")

</div>

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