Videos played by this player are being blocked by adblocker
nadecancode opened this issue · comments
For example, uBlockOrigin blocks the video from this link https://enime.moe/watch/vermeil-in-gold/10 and it throws UNKNOWN_ERROR . However, other players like https://github.com/zhw2590582/ArtPlayer don't trigger the block with exactly same video link and HLS.
Please provide the error and try to print the error.
player.on((type, payload) => {
if (type.indexOf('error')) {
console.log(payload)
}
})
Please provide the error and try to print the error.
player.on((type, payload) => { if (type.indexOf('error')) { console.log(payload) } })
I added logging to that page, it should log errors now. I don't know why but it looks like non-errors are also getting logged even there's type.indexOf('error')
player.on(({ type, payload }) => {
if (type.indexOf('error') != -1) {
console.log(payload)
}
})
player.on(({type, payload}) => { if (type.indexOf('error')) { console.log(payload) } })
I added this player.on(({ type, payload }) => { if (type?.indexOf('error')) { console.log(payload) } })
and it still logs like everything
EDIT: nvm I forgot the -1
@shiyiya Update: I just realized oplayer sets default preload attribute to "auto" which some adlockers kinda hate it cuz it means ads. I changed it to metadata
and it seems to no longer block.
🤯
🤯
I think it's better to make OPlayer default to metadata for preload to avoid further issues