Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Fixed a bug that would cause multiple instreams to fail #231

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simpleTechs
Copy link

When the event handler is removed on stop, it is not correctly re-added on start (only if _timer was not set at all).
This causes multiple inStreams to fail, i.e. the first one would play just fine, but after that the time would never execute the "onTimer" method; thus no other inStream would ever play.

When the event handler is removed on stop, it is not correctly re-added on start (only if _timer was not set at all).
This causes multiple inStreams to fail, i.e. the first one would play just fine, but after that the time would never execute the "onTimer" method; thus no other inStream would ever play.
@danrossi
Copy link
Contributor

danrossi commented Jun 7, 2014

Good catch the timer needs to be cleared so it can setup a new one. It was done to fix memory leak fixes with the playlist and other events and might have caused issues elsewhere. I would leave that code as it is and just do _timer = null; start will setup a new timer.

As per danrossi's requests, this re-introduces cleaning up the timer in stop and actually set's it to `null`, so that it's recreated in `start()`, with the appropriate event handler set up.
@simpleTechs
Copy link
Author

You are totally right, I did think of it but had no idea on how to fix it easily. But setting it to null will of course solve this problem :-)

@danrossi
Copy link
Contributor

danrossi commented Jun 8, 2014

i'll push a fix into a merged branch ive made with other fixes.

@danrossi
Copy link
Contributor

danrossi commented Jun 9, 2014

#233 created one here in this branch https://github.com/flowplayer/flash/tree/danielr-231

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants