I have a URL
of a video (it's not from youtube) that I want to run from window.open
, when it is executed the video player HTML5
of the browser is automatically loaded. The URL
that I have when read by the browser changes, it is not the same.
My dilemma, is that I need to get the URL
of the window (window.open)
or the SRC
of the player that runs in said window, "I do not need to modify or remove", only get the attribute "src"
of the player loaded and get the URL
, just that, just get the URL
and store it in a variable or in some result shown as in .innerHTML
or load a iframe
with URL
already processed and then the pop or window closes.
Url_del_video = link (change _ for. "point" and - for /)
Note: I would also use some other way to get the URL after being processed , I accept suggestions and / or proposals.
The code with which I have been trying uselessly is the following:
<!DOCTYPE html>
<html>
<body>
<script>
var myWindow = window.open("Url_del_video", "", "width=400,height=200");
var x = myWindow.getElementsByTagName("video")[0].getAttribute("src");
document.getElementById("demo").innerHTML = myWindow.x;
document.getElementsByTagName('iframe')[0].setAttribute('src',x);
</script>
<p id="demo"></p>
<iframe></iframe>
</body>
</html>
Once again, waiting for a quick response and thank you very much.