# Timing of experiment in background tab

**URL:** <https://discourse.psychopy.org/t/timing-of-experiment-in-background-tab/25706>\
**Category:** Online experiments\
**Tags:** timing, online, pavlovia\
**Created:** [October 29, 2021, 5:07pm UTC](https://discourse.psychopy.org/t/timing-of-experiment-in-background-tab/25706 "2021-10-29T17:07:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djangraw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/djangraw/32/3257_2.png) [@djangraw](https://discourse.psychopy.org/u/djangraw)\
**Post date:** [October 29, 2021, 5:07pm UTC](https://discourse.psychopy.org/t/timing-of-experiment-in-background-tab/25706/1 "2021-10-29T17:07:30Z")

</div>

**URL of experiment:** [Sign in · GitLab](https://gitlab.pavlovia.org/yukino/potd-task-test)

**Description of the problem:** We’re developing an experiment where people are allowed to leave the pavlovia task for a while and do something in another browser tab. After a few minutes, we’d like the task to play an alarm sound to let the person know it’s time to come back to the task. The way it seems to work now is that the waiting period finishes, but the alarm sound doesn’t play until the participant refocuses on the pavlovia tab. Is there any way to get the task to play the sound even when it’s in the background?

---

<div class="post-metadata">

**Author:** ![djangraw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/djangraw/32/3257_2.png) [@djangraw](https://discourse.psychopy.org/u/djangraw)\
**Post date:** [November 2, 2021, 12:15am UTC](https://discourse.psychopy.org/t/timing-of-experiment-in-background-tab/25706/2 "2021-11-02T00:15:01Z")

</div>

@jon @apitiot @wakecarter - sorry to bother you, but you’ve been very helpful on related questions in the past!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 2, 2021, 1:16am UTC](https://discourse.psychopy.org/t/timing-of-experiment-in-background-tab/25706/3 "2021-11-02T01:16:22Z")

</div>

Could you have a sound file that starts playing in the foreground but is actually several minutes of silence or ticking followed by an alarm?
