Confused

I am running latest Monterey and purchased KBM.

I am trying to use KBM to monitor a video stream in a browser. On occasion the stream stops with an error. I would like to “see” the message and mouse click the restart button in the browser. That will restart the stream.

The video is run full screen and is mirrored to my TV.

I have seen references to folks doing this with a trigger based on screen.

I can’t find that in the triggers list.

Can someone point me in the right direction?

Thanks

Dennis

I'm not sure the best way to approach that issue so I'll defer to some others that have more experience than me. I can share the triggers and actions documentation though.

https://wiki.keyboardmaestro.com/Triggers

https://wiki.keyboardmaestro.com/Actions

I'm not sure what the video stream browser page looks like but you might be able to use something like actions:Execute a JavaScript in Browser [Keyboard Maestro Wiki] to check the status of the stream on the page via JavaScript.

I also recommend checking out Tip: How Do I Get The Best Answer in the Shortest Time?

Hi and welcome to the forum!

You might be able to do something like this. You'll need the following:

  • The name of the website for the title does not contain condition.
  • A screenshot of the error message for the first image well.
  • A screenshot of the play/resume button for the second image well.

In use: Trigger this macro while watching the stream. It will check for the error message every 5 seconds. If the error is detected, it will refresh the page and click play/resume.

Restart Video Stream.kmmacros (99 KB)

Macro screenshot

1 Like

Thanks for getting back to me…

The web site is https://livenewspro.com

On occasion I see this…

Cannot load M3U8.png

Or this…

Error loading player.png

I want to drop out of full screen, that can be done by clicking on the screen.

And then click on Reload…

Mozilla_Firefox.png
Firefox is being used as the web browser.

The problems above occur with any internet provider and on any device used to view the site.

The site has an issue with their back end, I guess. They provide access to 25 news channels. Some have the problem others don’t.

I had read that KBM could read the screen and act on whatever.

Thanks

Dennis

Ok I've updated the macro above to include your found images.

  • The reload image doesn't need to be used; we can simulate the shortcut ⌘R instead.
  • I'm not sure that it's necessary to exit fullscreen before reloading the page, so I've left that action disabled. Right click for the Enable Action option.
  • You need to add the play button image into the macro's empty image well.
  • Going back to fullscreen when a video is playing can probably be done by simulating the F key.

You may need to add pauses between some of these actions, but see how you get on.

2 Likes

No, more likely it's Firefox blocking cross-site cookies. You could probably solve this entirely by allowing them for that site -- see Firefox's Preferences->Privacy & Security.

1 Like