Myworld
Myworld

Reputation: 1899

How can I play video in asp.net?

I worked on new website which play videos , these videos i save their path on DB and upload the videos " physical files" on folder in project directory . what i need is the best way which I can play this videos on asp.net . I searched more but i couldn't reach to the best . is there is tool in asp.net support play the video ? also what about JQuery is the best on playing the video ? .

<asp:DataList ID="DL_Media" runat="server">
                        <ItemTemplate>
                            <iframe width="215" height="160" src='<%#Eval("Media_File")%>' frameborder="0" allowfullscreen
                                runat="server"></iframe>
                        </ItemTemplate>
                    </asp:DataList>

Upvotes: 0

Views: 9905

Answers (3)

Rinat Galyautdinov
Rinat Galyautdinov

Reputation: 255

HTML5 is the answer to your problem

Upvotes: 0

Murali Murugesan
Murali Murugesan

Reputation: 22619

Detect HTML5 video <video src=""></video>along with Modernizer

if (Modernizr.video) {
  // let's play some video!
} else {
  // no native video support available :(
  // maybe check for QuickTime or Flash instead
}

In Plain Javascript

function supports_video() {
  return !!document.createElement('video').canPlayType;
}

If HTML 5 video is not supported by browser, you can inform that not supported or use flash/silverlight player

Upvotes: 2

Abhitalks
Abhitalks

Reputation: 28387

Easiest would be to use the video tag:

<video src="..."></video>

More information here: http://www.html5rocks.com/en/tutorials/video/basics/

Upvotes: 1

Related Questions