r/PowerShell•
HT_F8

Auto-restart buffering video stream

Question

Hello!

We usually have a few people over our house every week to stream NFL games, but lately the site has been buffering quite a bit (I assume due to many people tuning in). Often, the stream will buffer and show no sign of coming back, but a quick manual "Stop" and "Start" of the video player fixes the issue instantly 90% of the time.

After too many times of everyone in the room alternating who is going to get up to stop and start the video to get the feed back, I was wondering if anyone had an idea on how to automate this? I assume it would change slightly depending on which video player was being used, but I was imagining something along the lines of a script running that notices when the video buffers and then Stops and Starts the feed (either by its native controls or even just initiating a couple mouse-clicks in the bottom-left of the screen where the Stop/Play button would be). How complicated would this be? It sounds simple at first thought but the actual implementation of it seems a little tough.

I've already got remote access on my phone setup if I want to be lazy, but its more about speed than not having to get off the couch lol.

Thanks!

Posted Nov 2, 2022, 4:50 PM UTC

36
oze4•

need more info to help. what exactly are you getting up to "stop and start"? a laptop? some other device? how is the video playing on that device? a browser? something else?

2
HT_F8OP•

Yes, a laptop. Video playing in Chrome. Should have included that!

2
oze4•

Imo your best bet is to "hook" into the video player via JS in the browser. I'm not sure if there's a way to tell if the video is buffering or not though.

2
HT_F8OP•

Word. That is a start at the very least! Thank you.

1
Ghaz013•

Are you on Wi-Fi or hardlined? Also not sure why this in PS, you might get better luck under tech support or some other tech related sub Reddit

1
HT_F8OP•

Same regardless of WiFi or hardlined, its not me, its the site getting overloaded.

Posted here because I have no idea what platform this sort of project would run under, and when I googled about help with scripts and commissions, this sub came up. Might try in a js sub or something instead.

1