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
I am building a player with videocontext that allows clips to be added and removed.
When a clip is in view and the user deletes the clip, we destroy the video node, however the canvas is not cleared and the last frame that was rendered remains on screen.
I've found the reason to be that the Khan's algorithm used here is faulty because it does not consider the case where there are no connections and only one node (the DestinationNode)
(In this case sortedNodes is just an empty array instead of [this._destinationNode] which is the correct result)
The problem is resolved if I manually call _render and _update on the DestinationNode when there aren't any connections via an override of the VideoContext class. I can actually make a PR for a simple hotfix by checking if connections.length===0 then setting sortedNodes to [this._destinationNode] if you'd like.
The text was updated successfully, but these errors were encountered:
I am building a player with videocontext that allows clips to be added and removed.
When a clip is in view and the user deletes the clip, we destroy the video node, however the canvas is not cleared and the last frame that was rendered remains on screen.
I've found the reason to be that the Khan's algorithm used here is faulty because it does not consider the case where there are no connections and only one node (the DestinationNode)
(In this case sortedNodes is just an empty array instead of [this._destinationNode] which is the correct result)
VideoContext/src/videocontext.js
Lines 941 to 962 in 5f82048
The problem is resolved if I manually call _render and _update on the DestinationNode when there aren't any connections via an override of the VideoContext class. I can actually make a PR for a simple hotfix by checking if connections.length===0 then setting sortedNodes to [this._destinationNode] if you'd like.
The text was updated successfully, but these errors were encountered: