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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -