Add video in SharePoint Blog Post
<script type="text/javascript"> <!-- for (var i = 0; i < document.getElementsByTagName('*').length; ++i) {if (document.getElementsByTagName('*')[i].id.indexOf('youtube') == 0) {//get the parameters var tagtoadd= document.getElementsByTagName('*')[i].innerHTML.split(','); //create the string var finalstring = '<object width="'; finalstring += tagtoadd[0]; finalstring += '" height="'; finalstring += tagtoadd[1]; finalstring += '"><param name="movie" value="'; finalstring += tagtoadd[2]; finalstring += '" /><param name="allowFullScreen" value="'; finalstring += tagtoadd[3]; finalstring += '" /><embed src="'; finalstring += tagtoadd[2]; finalstring += '" type="application/x-shockwave-flash" allowfullscreen="'; finalstring += tagtoadd[3]; finalstring += '" width="'; finalstring += tagtoadd[0]; finalstring += '" height="'; finalstring += tagtoadd[1]; finalstring += '" /></object>"'; //replace it document.getElementsByTagName('*')[i].innerHTML = finalstring ; } } //—></script>
Edit the post and add following tag in the html of the post body. The tag should be in below format.(<div align="center" id="youtubeSNBS1">425,355,http://www.youtube.com/v/7SGp9pA9cAY;&hl=en;&fs=1,true</div>
)
Publish the post and see the effect.
IE
Chrome
Firefox
It works for all the browsers.
0 comments:
Post a Comment