1
0
mirror of https://github.com/pixeltris/TwitchAdSolutions.git synced 2024-11-22 02:12:45 +01:00

Fix player error 1000/3000 on vaft #271

This commit is contained in:
pixeltris 2024-09-24 14:14:20 +01:00
parent 8598024100
commit 055e1ad981
2 changed files with 28 additions and 20 deletions

View File

@ -217,6 +217,7 @@ twitch-videoad.js text/javascript
if (url.endsWith('m3u8')) {
return new Promise(function(resolve, reject) {
var processAfter = async function(response) {
if (response.status === 200) {
//Here we check the m3u8 for any ads and also try fallback player types if needed.
var responseText = await response.text();
var weaverText = null;
@ -228,6 +229,9 @@ twitch-videoad.js text/javascript
weaverText = await processM3U8(url, responseText, realFetch, PlayerType4);
}
resolve(new Response(weaverText));
} else {
resolve(response);
}
};
var send = function() {
return realFetch(url, options).then(function(response) {

View File

@ -229,6 +229,7 @@
if (url.endsWith('m3u8')) {
return new Promise(function(resolve, reject) {
var processAfter = async function(response) {
if (response.status === 200) {
//Here we check the m3u8 for any ads and also try fallback player types if needed.
var responseText = await response.text();
var weaverText = null;
@ -240,6 +241,9 @@
weaverText = await processM3U8(url, responseText, realFetch, PlayerType4);
}
resolve(new Response(weaverText));
} else {
resolve(response);
}
};
var send = function() {
return realFetch(url, options).then(function(response) {