player: fix protected videos in blink/webkit

master
Dominika Liberda 2023-04-21 23:43:41 +00:00
parent b9db596932
commit f8d2e2d7c4
1 changed files with 2 additions and 2 deletions

View File

@ -352,8 +352,8 @@ window.addEventListener('DOMContentLoaded', (event) => {
function handleProtected(e) {
console.log(e)
if(e.originalTarget.error.code == 4 && ! e.originalTarget.currentSrc.startsWith("https://"+window.location.hostname)) {
e.target.src="https://"+window.location.hostname+"/proxy?url="+encodeURIComponent(encodeURIComponent(e.originalTarget.currentSrc))
if(e.target.error.code == 4 && ! e.target.currentSrc.startsWith("https://"+window.location.hostname)) {
e.target.src="https://"+window.location.hostname+"/proxy?url="+encodeURIComponent(encodeURIComponent(e.target.currentSrc))
}
}