webarkit / ARnft

A small javascript library for WebAR with NFT
GNU Lesser General Public License v3.0
219 stars 53 forks source link

Improved disposing of nft workers and video streams. #267

Closed kalwalt closed 2 years ago

kalwalt commented 2 years ago

Enhancement in disposing of Workers

We have the dispose, disposeNFT and disposeVideoStream methods, but they don't properly remove the workers if we have an Array of multi workers and with the actual code you can't dispose a single NFTWorker. This PR try to fix this gap though it not completely solve the issue. stopNFT() has be removed because is useless, better to add an EventListener and dispatch a listener in the dispose function. See my comments below.

Tasks