jumpcutter
jumpcutter copied to clipboard
fix: "experimental algorithm" doesn't work sometimes (mostly on YouTube)
For example, for this video the clone gets the following clone.error:
MediaError {code: 4, message: 'CHUNK_DEMUXER_ERROR_APPEND_FAILED: Found Cluster element before Info.'}
I happens immediately as you load the video.
Here's the cloning code: https://github.com/WofWca/jumpcutter/blob/master/src/entry-points/content/cloneMediaSources/lib.ts
- I noticed that if we replace all
queueMicrotask(() => callback(with justcallback(, it becomes much much more reliable. So, shall we just do that? Addtry catchso that the original calls and setters don't throw. But why is this happening? Does this mess up the order of operations? Did we maybe forget to usequeueMicrotasksomewhere, or are using it twice somewhere?? - I suspect further issues could be caused by various
promise.then()s. Perhaps need to consider having a cached version of things that the promises resolve to. Also this could be related to thequeueMicrotaskorder from the previous point. - Also see TODOs in that file. Some things issues are already known, but it is unknown how often they manifest themselves.
MediaError {code: 4, message: 'CHUNK_DEMUXER_ERROR_APPEND_FAILED: Found Cluster element before Info.'}
this particular error got fixed (at least I haven't noticed it coming back) in b1f1278193a3597e69f3d521d634753a8ea31691