JavaScript
Embedding YouTube videos from links
Embedding video to a webpage make
a real change in the early day’s web. It
can make a multimedia interaction with web user and author .so feel of
that website become more realistic .most of users have broadband connection so
they are flexible with video contents .one of the most common used method is
using a flash player and flv videos those hosted in an external server
,like YouTube .
Embedding
YouTube
Code
function linkToYoutube(link, ops) {
var o = $.extend({ width: 480, height: 320, params: '' }, ops); var id = /\?v\=(\w+)/.exec(link)[1]; return '<iframe style="display: block;"'+ ' class="youtube-video" type="text/html"'+ ' width="' + o.width + '" height="' + o.height + ' "src="http://www.youtube.com/embed/' + id + '?' + o.params + '&wmode=transparent" frameborder="0" />'; } $('a').each(function(){ var link = $(this).attr('href'); $(this).html( linkToYoutube(link, { params: 'theme=light' }) ); })
1 comments:
Thank you so much for these kinds of informative blogs.We are also a digital marketing company in gurgaon and we provide the website design services,
web development services, e-commerce development services.
website designing in gurgaon
best website design services in gurgaon
web company in delhi
web desiging company
web design & development banner
web design & development company
web design & development services
web design agency delhi
web design agency in delhi
web design and development services
web design companies in delhi
web design company delhi
web design company in delhi
web design company in gurgaon
web design company in noida
web design company list
web design company services
web design company website
web design delhi
web design development company
web design development services
web design in delhi
web design service
web design services company
web design services in delhi
web designer company
web designer delhi
web designer in delhi
web designers delhi
web designers in delhi
web designing & development
web designing advertisement
web designing and development
web designing and development company
web designing and development services
web designing companies in delhi
web designing company delhi
web designing company in delhi
web designing company in gurgaon
web designing company in new delhi
Post a Comment