-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple calls to EventController.start without EventController.reset/.clear causes uncaught TypeError #1054
Comments
@bbcrddave attempted to reproduce it but was not able to. Do you have an mpd that produces this issue? Does this happen in 1.5.1 and /or 1.6.0 ? |
Can reproduce using several manifests, try: http://dash.edgesuite.net/dash264/TestCases/1a/netflix/exMPD_BIP_TC1.mpd In the reference player: start playing, seek around a few times, click load to reload manifest. The problem existed in a similar way in 1.5.1 (many calls to start without a clear/reset), but the required state (videoModel) was a singleton injected by dijon so would always be available. |
@bbcrddave @AkamaiDASH I was not able to reproduce the uncaught TypeError in the current dev branch using the manifest Dave mentioned. I tried seeking and reloading the manifest after the presentation has finished, but works fine for me. Has this been fixed in the meantime? |
@bbcrddave You are right it looks like the EventController is not started at all. I tried to implement a solution for both problems. Maybe you can tell me if you agree: Since the EventController is a singleton I think we should trigger the interval only once when the playback is started and remove it when the playback has finished. Still wondering if I missed something regarding multiperiod issues. |
I don't think this will work quite right in the multi-period case: This has reminded me that we really could do with implementing some method of synchronisation with the media timeline here, since currently events will continue to be fired despite the media time not advancing if the player is paused for example. That's for a different day though 😉 |
Thinking about this some more, any remaining events should be cleared at the end of each period, so perhaps the controller should be reset between periods. In the short term we should probably get this fixed in the simplest way - something like what you suggest - then look to fix this properly in a later version. |
Thanks Dave. I agree for now we should focus on a simple fix. I will try to take a more detailed look at this in the next few days if you haven´t done already? |
@dsilhavy I wanted to see if you have a chance to look at this after pulling HEAD of dev.
I think this comment is resolved after I changed the autoplay logic. But maybe if autoplay is off the event controller will not start without the change you have @fraunhoferfokus4efab9f |
@AkamaiDASH @bbcrddave
I will issue a pull request tomorrow since this is the deadline. But I was wondering if you have any feedback on the EventController stuff. You can find it here: |
Thanks for the update Let me check out the diff on your fork and ill add comment if I have any. You overview seems like the right way.... |
@dsilhavy Regarding -
This is the desired behavior correct? I think it stopped after 436ccc9 and started working this way again after this change. e75e65e Your other changes seem correct. |
@AkamaiDASH I think this is ok for now everything should work as expected |
LGTM 👍 |
closing flixed with PR #1120 |
EventController has an interval which is created when
.start()
is called, regardless of whether an interval already exists. If.start()
is called multiple times without a.clear()
or.reset()
, the existing interval is not cleared and therefore runs forever as its handle is lost.When the EventController is reset, its state is lost but the existing interval still attempts to access that state (playbackController specifically), causing an uncaught TypeError.
This can be reproduced easily by seeking during playback when autoplay is enabled, or reloading the manifest once the presentation has been completed.
The text was updated successfully, but these errors were encountered: