Click here to Skip to main content
13,350,708 members (78,069 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
I am working on ASP.Net application which will provide the Video gallery. I ll have video link on my database. I need to embed those video on my page dynamically (it may from youtube,yahoo,DailyMothion or any other site..).

I have worked as followed by Embedded Video , but it will allow only to play you tube videos, other videos are not playing.

<object width="480" height="385">
<param name="movie"
   value="http://www.youtube.com/v/ITswHbJPHhQ?fs=1&hl=en_US&rel=0"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/ITswHbJPHhQ?fs=1&hl=en_US&rel=0"
   type="application/x-shockwave-flash" allowscriptaccess="always"
allowfullscreen="true" width="480" height="385"></embed></object>



Please suggest me to achieve
Posted 10-Jul-14 2:52am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Sounds like you're looking for oEmbed[^] - so long as the site supports an oEmbed API, you can pass it a link to a video and it will return the markup required to display that video.

There's a jQuery wrapper[^] which will convert a list of links into embedded players:
<div><a href="http://www.youtube.com/v/ITswHbJPHhQ?fs=1&hl=en_US&rel=0" class="oembed">YouTube Video</a></div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="jquery.oembed.js"></script>
<script>
$(function() {
    $("a.oembed").oembed();
});
</script>


Alternatively, you could use a server-side solution such as OptionStrict.oEmbed[^] to generate the markup on the server.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 10 Jul 2014
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100