Closed narirou closed 7 years ago
If the _contentHasEnded
state is set, there is still an ended event after replaying the video. This is the code that handles it:
https://github.com/videojs/videojs-contrib-ads/blob/master/src/plugin.js#L540-L548
Think of _contentHasEnded
as meaning "the content has ended at least once, but could end again"
Hello.
We have a problem that the events when replaying the video are sometimes different.
This plugin has a function to re-dispatch event while AD is playing. In the code, the
ended
event determines whether it becomescontenteded
orended
depending on the state of_contentHasEnded
. https://github.com/videojs/videojs-contrib-ads/blob/master/src/plugin.js#L681When replaying the video, since _contentHasEnded is not reset, I think that the ended event will not fire.
Is there a way to reset all the internal state of AD (including
_contentHasEnded
) and fire the ended event again?Thanks.