You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flash player seems to send an extra timeupdate event after the ended event. This is causing confusion for the javascript that's driving the player in my case. In any case, this seems incorrect (and doesn't match the behavior of the HTML5 player).
As far as I can tell the issue is this.
The 'ended' event listener in the mediaelement-and-player.js calls setCurrentTime(0) which calls setCurrentTime(0) on the plugin. The setCurrentTime function in VideoElement.as does the following:
Which is the right behavior in most cases, but seems wrong after the video has ended.
Furthermore, the stream.time turns out to be incorrect in the timeupdate event because of the asynchronous nature of NetStream.seek
A fix that would work for my case would be to check before sending the timeupdate:
The flash player seems to send an extra timeupdate event after the ended event. This is causing confusion for the javascript that's driving the player in my case. In any case, this seems incorrect (and doesn't match the behavior of the HTML5 player).
As far as I can tell the issue is this.
The 'ended' event listener in the mediaelement-and-player.js calls setCurrentTime(0) which calls setCurrentTime(0) on the plugin. The setCurrentTime function in VideoElement.as does the following:
Which is the right behavior in most cases, but seems wrong after the video has ended.
Furthermore, the stream.time turns out to be incorrect in the timeupdate event because of the asynchronous nature of NetStream.seek
A fix that would work for my case would be to check before sending the timeupdate:
I'm not sure if I'm missing some case where that would cause the wrong behavior.
I'll submit a pull request for folks to look at / comment on.
The text was updated successfully, but these errors were encountered: