Fix vaft ad leakage ("Preparing your stream..." screen will be displayed)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
twitch-videoad.js text/javascript
|
||||
(function() {
|
||||
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
|
||||
var ourTwitchAdSolutionsVersion = 9;// Used to prevent conflicts with outdated versions of the scripts
|
||||
'use strict';
|
||||
var ourTwitchAdSolutionsVersion = 10;// Used to prevent conflicts with outdated versions of the scripts
|
||||
if (typeof unsafeWindow === 'undefined') {
|
||||
unsafeWindow = window;
|
||||
}
|
||||
@@ -327,13 +328,16 @@ twitch-videoad.js text/javascript
|
||||
//Here we check the m3u8 for any ads and also try fallback player types if needed.
|
||||
var responseText = await response.text();
|
||||
var weaverText = null;
|
||||
weaverText = await processM3U8(url, responseText, realFetch, PlayerType2);
|
||||
var fallbackWeaverText = weaverText = await processM3U8(url, responseText, realFetch, PlayerType2);
|
||||
if (weaverText.includes(AdSignifier)) {
|
||||
weaverText = await processM3U8(url, responseText, realFetch, PlayerType3);
|
||||
}
|
||||
if (weaverText.includes(AdSignifier)) {
|
||||
weaverText = await processM3U8(url, responseText, realFetch, PlayerType4);
|
||||
}
|
||||
if (weaverText.includes(AdSignifier)) {
|
||||
weaverText = fallbackWeaverText;
|
||||
}
|
||||
resolve(new Response(weaverText));
|
||||
} else {
|
||||
resolve(response);
|
||||
|
||||
Reference in New Issue
Block a user