i am working on a video player right now and i am using the VideoComponent for it. Almost everything is working so far. But i stumbled over a thing that really puzzles me.
I use “onPlaybackStop” to check, when a video stops. This is triggered when i stop the video manually OR when it stopped automatically, because the end was reached. In order to find out, which of both was the case (manually vs. automatically) i compare getPlayPosition() with getVideoDuration(). If it’s the same, the video has stopped automatically.
On MacOs this works fine. On Windows getPlayPosition() unfortunatly returns 0.0, when the video has ended.
Does anybody have a better idea on how to distinguish betweenn an automatic and a manual stop?
I finally solved this by using a flag, which is set to true when the user user stops the video. that works so far.