DEV Community

Cover image for How I build my own stand-up reminder
Nithyanandam Venu
Nithyanandam Venu

Posted on • Edited on

How I build my own stand-up reminder

Before we get into details, let me put out the reason behind this effort. As the pandemic hits and WFH starts, my physical activity has been reduced drastically. And I was spending even more time on my desk compared to the office environment. Since my entertainment also lies within my desks such as gaming and reading. The continuing situation put a toll on my back hence I decided to act on it.

Back Hurts

As the saying goes ‘start small’. I have narrowed down the possible option to improve my physical activity and decided to follow it up. The simplest one is standing up at regular intervals after sitting down at the desk for a while.

Time to begin

This is something that can be accommodated easily in the schedule right. Hence I picked it up and searched for a stand-up reminder on google. Unfortunately, there are not any simple options present to use effectively on my laptop.

And yea obviously I don’t want to extend this into my smartphone. As my digital time is already too high and also it would easily make me get distracted by my smartphone.

No SmartPhone

Ok time to get hands dirty. So in hindsight, I planned out a simple HTML page that can load out an audio/video in a set period of interval time, and keeping the chrome tab on would be the only downside of it I thought also dumped the idea of using audio since I couldn’t find any proper web API to get audio content. Decided to go with youtube video as it was an easy option.

Time to Code

So coded out a simple HTML page and when I tried to autoplay on the iframe. Chrome was smart enough to not let me autoplay the video with sound as an access policy.

Even though that made me annoyed, kudos to chrome which doesn’t want to annoy the user by playing autoplay video even worse if the user is not even in the tab, he would have to go through all tabs and figure out where the sound was coming from.

So it was a pretty good fix and access policy from chrome. What I thought would be a 5 mins work taught me about chrome access policy and youtube embed options.

Got Stuck

Now I am almost stuck and also I don’t want to spend more time on it. Time to rethink my decision!

Rethink strategy

Ok now let’s ditch chrome and go for a native app. Do I know native desktop app development? no obviously. Currently is there any place where you can’t run javascript?

Exciting Idea

Here comes the saviour electron. Going to do the same implementation but just going to transfer it to the native app. According to my assumption, it should work 100%. Again there is no time to learn the design fully.

Took out the hello world example and modified it a little specifically removing the same origin cors policy meta in HTML to load out the youtube video.

It works

Hola! It worked like a charm!!

Standup reminder app screenshot

Set your duration in minutes. Put your favourite video URL from youtube. Our Standup Reminder is ready to go! Minimize the app and do your stuff. Once the time interval hits, the video will play automatically.

For example, you can set it to 60 minutes and it will play every one-hour interval and you can use it to remind yourself to take a break and stand up.

Don’t want the reminder just close the app. Was it too much to do for a simple stand-up reminder? Might be, but why not have fun when you can!!

So this is how I build my own stand-up reminder. It took an hour almost. Was it worth doing? absolutely. Want to check out the project and use it for yourself https://github.com/vbinithyanandamv/Stand-Up-Reminder. Check out the repo.

Should I polish it out and publish it as an app and share it with non-programming folks let me know in the comment. Have any feature ideas for this please feel free to let me know!

Top comments (0)