ofxWMFVideoPlayer . How to detect that video playback finished like EventListener

Hi
I am using ofxWMFVideoPlayer to play a 2 minutes long video in Windows10.
I can check every frame in update() if the video is still playing or stoped, but I don’t know how to get an ‘event listener’ to trig something just when finish the playback.

I tried to compare the current_video_time with video_duration_time but when the video playback finish, both times differes like 200ms… So I can not check: current_time >= duration_time.

Best way would be to use and event listener that trigs when videoplayback ends…

I’d check the isPlaying() value (or isStopped()) in your update loop; if you want an event that would be good to trigger there. Potentially you could customize the video player class to has a built in event to be triggered when the internal state change.
To trigger only once, you could have a boolean needToTriggerEvent set to true when you start the playback, and if the player is paused/stopped lookup the value of that boolean, trigger the event if needed and then set it to false.