url - Editing using Javascript -


i trying put youtube video iframe, when realized have put "embed" between youtube.com , video id. problem extracting these urls api urls in 1 array , direct url video.

is there way me edit url can add embed in between?

you can use string.replace

var url = "http://www.youtube.com/watch?v=xgsy3_czz8k";  var embedurl = url.replace("watch?v=","embed/"); 

so if wanted replace in array

for (var = 0; < thefeeds.length; i++) {     thefeeds[i].link = thefeeds[i].link.replace("watch?v=","embed/");     } 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -