I'm using an event listener to display captions while reading a video, and the event is only fired once per video; all the captions works just fine the first time a video is played but the next time this video is played no event is fired.
I've been tracing the eventlistener itself, the second time the same video is played the eventlistener is set, but doesn't work. I tried to remove and re-add the eventlistener, but it didn't fix the problem.
The structure of each item played is the following: a SerialElement which contains a ParallelElement which contains a VideoElement. I'm adding the TimelineMetadata on the ParallelElement.
Is there any reason while TimelineMetadata events might be triggered once? I'm using OSMF 1.0, maybe someone knows if anything new in 1.5 might fix that?
Auto reply mediaPlayer = new MediaPlayer(); solved everything!