'Playing music in python in replit

I'm having trouble playing music in the background of my program in replit. I have tried using Pygame but couldn't get that to work, so I followed the official replit tutorial video: https://youtu.be/CuIV2-ivg0U . I get the confirm audio screen but nothing plays, my file is .wav and is 29 secs long and plays when I go directly onto the file, but not when the program runs. I have uploaded the file into replit so it appears alongside main.py, any help would be appreciated, let me know if any additional info is needed, Thanks.

My code:

from replit import audio
source = audio.play_file("music.wav")
while True:
  pass


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source