File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ window.Worker = class Worker extends oldWorker {
1818
1919 var newBlobStr = `
2020 var Module = {
21- WASM_BINARY_URL: 'https://cvp.twitch.tv/ ${ version } /wasmworker.min.wasm',
21+ WASM_BINARY_URL: 'https://static.twitchcdn.net/assets /wasmworker.min- ${ version } .wasm',
2222 WASM_CACHE_MODE: true
2323 }
2424
2525 ${ functions }
2626
27- importScripts('https://cvp.twitch.tv/ ${ version } /wasmworker.min.js');
27+ importScripts('https://static.twitchcdn.net/assets /wasmworker.min- ${ version } .js');
2828 `
2929 super ( URL . createObjectURL ( new Blob ( [ newBlobStr ] ) ) ) ;
3030 }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function getFuncsForInjection (usePerformanceFix) {
1717 }
1818
1919 function stripAds ( textStr ) {
20- var haveAdTags = textStr . includes ( '#EXT-X-SCTE35-OUT' ) ;
20+ var haveAdTags = textStr . includes ( '#EXT-X-SCTE35-OUT' ) || textStr . includes ( 'stitched-ad' ) ;
2121
2222 if ( haveAdTags ) {
2323 self . _wasAd = true ;
@@ -42,9 +42,10 @@ function getFuncsForInjection (usePerformanceFix) {
4242 // So let's reuse the last stream chunk. This will most likely buffer/be glitchy.
4343 // We manually increase the sequence number.
4444 // TODO: Find better solution?
45- textStr = self . _lastStreamChunk ;
4645 if ( textStr === undefined ) {
4746 textStr = '' ;
47+ } else if ( self . _lastStreamChunk !== undefined ) {
48+ textStr = self . _lastStreamChunk ;
4849 }
4950 var currSeq = parseInt ( getSeqNr ( textStr ) ) ;
5051 if ( self . _lastSeq === undefined ) {
@@ -224,5 +225,5 @@ function getWasmBinaryVersion (twitchBlobUrl) {
224225 var req = new XMLHttpRequest ( ) ;
225226 req . open ( 'GET' , twitchBlobUrl , false ) ;
226227 req . send ( ) ;
227- return req . responseText . match ( / t v \/ ( .* ) \/ w a s m w o r k e r / ) [ 1 ] ;
228+ return req . responseText . match ( / w a s m w o r k e r \. m i n \- ( .* ) \. j s / ) [ 1 ] ;
228229}
You can’t perform that action at this time.
0 commit comments