Question: Why does audio files not play in replit mobile app, whereas it does without hassles in a laptop
import random
import time
from replit import audio
run_time = 120 # in seconds
time_gap = 3 # in seconds
audio_files = ['audio/left.wav', 'audio/right.wav']
def issue_commands(run_time, time_gap):
end_time = time.time() + run_time
while time.time() < end_time:
audio.play_file(random.choice(audio_files))
time.sleep(time_gap)
issue_commands(run_time, time_gap)
Replit link: https://replit.com/@SambhaviDhanaba/Baddy-Coach
Indentation is lost, but the actual repl has it fine. I’m not quite sure as to how to link a public repl here, as urls are not allowed in a post.
1 Like
Hi @SambhaviDhanaba this is possibly just a feature that is yet to be added to the app. I’d suggest submitting feedback directly through the app by shaking your phone.
3 Likes
Thanks @CodingCactus . I shall submit a request from my phone.
1 Like
That’s not entirely true. Join links are not allowed in posts, but the normal links to view a Repl are.
1 Like
Thanks @IanAtReplit . When I pasted my repl link and tried to submit, it said links are not allowed. Anyways, it’s just a small piece of code, hence I pasted the code on the original post itself.
1 Like
Posted the link in the original post. Worked ok. Did you try to do this from the website or the mobile app?
2 Likes
Thanks Ian. I tried pasting the link from website.
1 Like