Html

Convert a youtube video URL to embed code

Pinterest LinkedIn Tumblr
<script>
    function myFunction() {
        var str = "https://www.youtube.com/watch?v=rqVfOb2m6Xo";
        var res = str.split("=");
        var embeddedUrl = "https://www.youtube.com/embed/"+res[1];
        document.getElementById("demo").innerHTML = res;
    }
</script>

Write A Comment

Faster PHP Cloud Hosting