When to detect when video is stopped or finished

Hi,

I'm currently developping a channel which involves starting an external program when playing a video. I'd like to know if it's possible, somehow, to detect that the video is not playing anymore, so that I could properly terminate this external program.

 

At the moment, since Plex and this program communicate through an HTTP interface, my only possible way to do is to monitor for ESTABLISHED connections on the communication port and basically wait for connection time-out, which can take a few minutes..

 

A callback on the plugin code would be the best scenario here. Or maybe if I could somehow force my plugin to run in his own process, I could detect that this (parent) process is stopped and kill my external program at the same time...

 

Please help! :)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.