This timer is intended for use in OBS's built-in browser source.
To see it in action, add a "Browser" source in OBS, and set the URL to:
https://bluemoonstone.github.io/obs-timer/
You will see a 25 minute timer with a transparent background.
You can set the options through URL query strings.
Example: 5-minute timer with small bell sound at the beginning and shop bell sound at the end
https://bluemoonstone.github.io/obs-timer/?time=5&startSound=1&endSound=3 Preview
After you choose everything you want, write down the URL (OBS's browser source should remember it). Then you can use the same URL to start the same timer.
Here are all the available parameters:
| Parameters | Values |
|---|---|
time |
Time in minutes (default: 25) |
startSound |
Sound to play at the start of the timer (default: 0, no sound)Available values: |
startSoundVol |
The volume of the start sound. Takes a decimal point value between 0 and 1
(default: 1)
|
endSound |
Sound to play at the end of the timer (default: 0, no sound)Available sounds are the same as the startSound parameter.
|
endSoundVol |
The volume of the end sound. Takes a decimal point value between 0 and 1
(default: 1)
|
loopEndSound |
If set to 1, continues playing the end sound until you change scenes in OBS. (default:
0, no loop)This might be useful for people with hyperfocus, like me. To stop the end sound without changing scenes, use OBS's Studio Mode and click the "Transition" button with the same scene. |
voice |
If set to 1, plays spoken navigation messages such as "Let's begin" and "You're halfway
through." (default: 0, no voice navigation)The messages are:
2, plays messages for a break session.The messages are:
|
voiceVol |
The volume of the spoken voice messages. Takes a decimal point value between 0 and
1 (default: 1)
|
preChime |
Sound to play before the voice messages in the middle of the session, so that they don't surprise you.
(default: 0, no sound)Available sounds are the same as the startSound parameter.To add sounds before the messages at the start and end of the session, use startSound and
endSound parameters. |
preChimeVol |
The volume of the pre-chime. Takes a decimal point value between 0 and 1
(default: 1)
|
hideProgBar |
If set to 1, hides the progress bar. (default: 0, show progress bar)
|
hideTimer |
If set to 1, hides the timer. (default: 0, show timer)
|
countUpProgBar |
If set to 1, the progress bar starts from 0% and fills up to 100%. (default: 0,
starts from 100% and goes down)
|
hideShadow |
If set to 1, hides the shadow around the timer. (default: 0, apply shadow)
|
You can easily switch between different timers by creating multiple browser sources.
For example, you can create 3 browser sources for 25-minute, 5-minute, and 15-minute timers for your Pomodoro session.
https://bluemoonstone.github.io/obs-timer/?time=25&endSound=1https://bluemoonstone.github.io/obs-timer/?time=5&endSound=1https://bluemoonstone.github.io/obs-timer/?time=15&endSound=1You can even use hotkeys to switch timers by assigning each browser source to different scenes and setting "Switch to scene" hotkeys in the OBS settings.
OBS browser source might have the following custom CSS by default:
body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden; }
You can customize styles that are not listed above as query parameter options, such as font-size or color by using the custom CSS.
When you use this timer in browsers like Chrome or Firefox, the timer sound won't play automatically until you click somewhere on the page. This is a restriction on modern browsers.
You will see an error like below in the devtool:
NotAllowedError: play() failed because the user didn't interact with the document first.
This error shouldn't happen if you use the built-in browser source in OBS.