instance01 / Twitch-HLS-AdBlock

Block advertisements that are inserted in Twitch streams directly.
MIT License
261 stars 24 forks source link

Stream freezes when sequence is rewritten to 0 #12

Open stoically opened 5 years ago

stoically commented 5 years ago

A side-effect of self._seq and self._wasAd keeping their values when switching streams (through xhr website-navigation which doesnt reload the wasmworker) is that the sequence can "always" get set to 0 - if the sequence of the new stream is smaller than the already set _seq - resulting in a stream-freeze (even if no Ad plays).

instance01 commented 5 years ago

Good catch, maybe hook into the router and just reset on each change. Or, probably much easier, add onClick listeners to the affected elements (I'd say sidebar and when browsing channels).