How I build my own stand-up reminder
Published: 2022-04-18 07:11:27


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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcjio2izv6n59nbr5372.gif)


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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5tf4ca02vlk8k7eqcjd.gif)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ar4e81vm2wyr9oy8u434.gif)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/twzn1ikala4c8hom9oa7.gif)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/puc34g9tsocisa2mtipq.gif)

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


![Rethink strategy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qxi9g74o0ysgsru25vn.gif)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zm8yem2dyivj8trlym4m.gif)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ub6sz72741b7zlo0bk57.gif)

Hola! It worked like a charm!!


![Standup reminder app screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9m0h2ofxmclt8j0t7y6s.png)

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!