how to run a video clip using asp.net?

2019-03-07 01:56发布

问题:

I want to embed video player in asp.net which can support multi video formats and can run same format clip in different browsers. i.e mp4/ogg clip can be played on firfox as well as on chrome

回答1:

Nothing to do with asp.net (this is pure html stuff), just write out a html video tag

html5rocks

diveintohtml5



回答2:

May I suggest this simple code:

<video width="320" height="240" controls>
<source src="videoSource.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

Source: W3Schools

You can use swf files, if you want, in this way:

<embed src="sourceSWF.swf" height="200" width="200">

Good luck!