class Test{
constructor() {
this.VideoUrl = "";
this.url = "https"
}
getUrl(){
let xhr = new XMLHttpRequest();
xhr.open("GET", this.url, true);
xhr.send();
let transfer =(x)=>{
this.urlToVideo = x;
}
function handler() {
let VideoUrl = this.responseXML
transfer(VideoUrl);
}
xhr.onload = handler;
}
log(){
console.log(this.urlToVideo)
}
}
test.getUrl()
test.log()