I want to play a video file without any installed plugin for example. File extensions include .mov, .flv, .avi, or another. How can i play a video file but i won't user must be to install flash player and how can i play mp3 file in Asp.net in C#? I installed visual studio 2010 ultimate.
Asked
Active
Viewed 6,326 times
0
-
Take a look at HTML5 and checkout HTML5Boilerplate project – IrishChieftain Oct 07 '12 at 19:33
-
Having looked into this myself your options are pretty limited. Either your users will need to install a plugin, or use HTML5. If you are looking to have users upload files then you may need to pre-process the video files into the format that you need, or limit the file types that can be uploaded. AVI files are just a wrapper for certain codecs. It's why you still need one type of codec for one AVI file, and another codec for a 2nd AVI file. If you allow AVI files, you may need to post the codec(s) that you allow to be uploaded. – Riana Oct 07 '12 at 19:43
-
1This is a question more about HTML than C# and ASP.Net. Have a look at http://stackoverflow.com/questions/1086886/html-5-video-tag-vs-flash-video-what-are-the-pros-and-cons – Lukasz Madon Oct 07 '12 at 19:43
-
@lukas I don't think he knows enough to know the options. He doesn't mention HTML in his question, the answers are pointing him that direction as an option however. Also he could very well do this all in C# if he chose. – Riana Oct 07 '12 at 19:45
2 Answers
4
You have two options:
HTML5 video
<video src="movie.avi" controls> <!-- The msg if browser doesn't have HTML5 video support --> </video>
<object>
for Windows Media player/QuickTime etc.
The first option will let you embed nicely the video, but will limit the user base(less than a half of browsers have HTML 5 support). Second option force the user to download the app.

Lukasz Madon
- 14,664
- 14
- 64
- 108