Messages Audio file

  • 13 September 2022
  • 8 replies

Userlevel 3
Badge +5

I’ve added an .mp3 file to a message that goes off from a default under certain conditions. Unfortunately, it does not seem to work in both the Windows and Universal GUI.

🔇 No audio; 

⬜️ No preview available;


.mp3 and .wav


No preview available.

Am I missing something? The new feature to add a sound to your message by uploading an Audio file in not yet in the (TCP) feature matrix. 


Best answer by Mark Jongeling 13 September 2022, 13:08

View original

8 replies

Userlevel 7
Badge +19

Hi Dennis,

After the implementation of this idea, it caused a bug to appear that resized all text and such after a message popped up inside the GUI when a different Windows Zoom-in level was used. The original code has been commented out for the time being, and therefore not causing the bug to reappear.

Sadly this has not been re-implemented by the team. I'll make sure this will be picked up in the near future. Sorry for the inconvenience. 

Userlevel 5
Badge +2

@Dennis van Leeuwen I happened to have the same question today. In addition to Mark’s answer: I understood from the Universal team that most of the development work for this feature is done, but that it is not yet released.

Userlevel 7
Badge +19

Hi @Dennis van Leeuwen,

We just released the 2022.2.15 of the Windows and Web GUI. This version can play audio files (.wav & .mp3) as intended 😄


Userlevel 3
Badge +5

With the Windows GUI release 2022.2.15, the audio message works properly 👍🏽

My earlier blog shows that I have an audio file of 26:00 sec attached to a message. The audio plays in full when the pop-up window is displayed. When one clicks the pop-up away the sound continues. In the debugger, the start and stop time of the audio cannot be traced. 

Can you explain through which (Windows) function this is executed? I'm very curious about the technical background of how this works.

Userlevel 7
Badge +19

For what I have heard, the audio is a separate process that the GUI starts when a message with audio file gets thrown. The audio will play in its entirety no matter if the message pop-up has been interacted with.

So in theory, an audio file of a 10-hour loop of Nyan cat will play until the GUI is closed or until you have successfully listened to the entire thing 😅

Userlevel 3
Badge +5

In that case, I will make an 8-hour remix for my colleagues. When that is finished, they may go home. 

I found the following article:

You need to know that background playback consists of two processes:

  1. the foreground app (the app UI and client logic)
  2. the background playback task (the audio playback logic and background services)

In the sample app we’re developing, the user selects and controls the audio, which is then played in the background. By definition, background audio continues playing even when the app is no longer in the foreground.

The background task communicates with Windows through the System Media Transport Controls (SMTC), which lets your app use the media controls and update metadata for the display. It also listens for foreground app events broadcast by the BackgroundMediaPlayer.

Perhaps it is developed based on this technique?

Userlevel 7
Badge +19

@Dani, can you elaborate? 😅

Userlevel 1
Badge +1

Hey @Dennis van Leeuwen ,
To play the sound we’re not using the IBackgroundTask interface or BackgroundMediaPlayer class for UWP.
We use System.Media.SoundPlayer to play .wav file and NAudio to play the MP3 file.