Share your repls and programming experiences

← Back to all posts
I need help
NabeelKhan21 (0)

Im trying to add music to my background for a project please could someone assist me. I'm completely new to coding and don't have a clue of what I'm doing. Ive been searching tricks and tips but I haven't been able to come across anything

Comments
hotnewtop
Dunce (50)

Hello, you kind of need to do something special to play audio on Replit. Here's some documentation about it. Also I recommend that you post questions on the ask board, here.

edit: if anyone sees this again note that there's now a better way to play audio on Replit.

step 1

Turn on explorer mode here

step 2

Go to the IDE and click on the padlock symbol. Wait for it to load, it could take a few seconds. Then copy and paste the following text into the text box titled "key": VNC_ENABLE_EXPERIMENTAL_AUDIO. Then set the text box titled "value" to 1. Then click add secret.

step 3

Click on the tab titled "shell", next to the console tab. Then type kill 1 into the shell.

step 4

Use the module of your choice to play audio, it should work like normal. When you run the repl the display should come up, so do make sure to click the headphone icon in the bottom right corner of the display, otherwise it will be muted.

SixBeeps (5061)

This belongs on Ask.
Anyways, Replit has it's own way of playing audio. Standard audio libraries do not work at the moment.