# Prevent screen sleep while audio recording

**URL:** <https://community.glideapps.com/t/prevent-screen-sleep-while-audio-recording/67814>\
**Category:** Ask for Help\
**Tags:** custom-code\
**Created:** [November 15, 2023, 5:07am UTC](https://community.glideapps.com/t/prevent-screen-sleep-while-audio-recording/67814 "2023-11-15T05:07:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harrison](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/harrison/32/65943_2.png) [@Harrison](https://community.glideapps.com/u/Harrison)\
**Post date:** [November 15, 2023, 5:07am UTC](https://community.glideapps.com/t/prevent-screen-sleep-while-audio-recording/67814/1 "2023-11-15T05:07:36Z")

</div>

I’ve made an app that uses the record audio feature and it works great… as long as the screen doesn’t fall asleep. Once the screen goes off it disconnects the audio recorder to where it doesn’t submit with the submit button and adds a blank row in the database.

I’m looking at some Wakelock JavaScript and am going to start playing with it but I figured I would see what is out there first. Thanks!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 15, 2023, 11:20pm UTC](https://community.glideapps.com/t/prevent-screen-sleep-while-audio-recording/67814/2 "2023-11-15T23:20:06Z")

</div>

Sounds like an interesting use case. Hope someone can chime in. I’m not sure you can have a Wakelock implementation using components in Glide though.
