Try using the jPlayer jQuery plug-ing. (www.jplayer.org). You will have to name the mp4 file as m4v to get it to work. Whether you use PHP or ASP.Net is irrellevant since this is client-side stuff so neither of them should
interfere.
You need a system that does two things. 1) can output the HTML 5 video element in order to support tablets which don't have flash support, and 2) a fallback flash player that supports browsers that do not support the HTML 5 video element.
jPlayer will do this. There are other options as well. The most popular being FlowPlayer (htttp://www.flowplayer.org). I used FlowPlayer extensively but the most recent release seems to be more of a complete re-tooling and doesn't work as well so I switched
to jPlayer.
Don't forget to mark useful responses as Answer if they helped you towards a solution.
Mobile browsers are not going to work with Silverlight. There's more mobile support for Flash.
Firefox may not have supported MP4 video encoding until recently because of licensing fees associated with the video format. There are free tools to convert your video to an OGG (open source) file, which Firefox and others will be able to play. Then you
modify the <video> tag to include a link to both versions like in the example on w3schools.com
<video width="320" height="240" controls="controls">
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Mobile browsers are not going to work with Silverlight. There's more mobile support for Flash.
Firefox may not have supported MP4 video encoding until recently because of licensing fees associated with the video format. There are free tools to convert your video to an OGG (open source) file, which Firefox and others will be able to play. Then you
modify the <video> tag to include a link to both versions like in the example on w3schools.com
<video width="320" height="240" controls="controls">
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
This sounds like the easiest solution. I'm going to try this and see if it works. I'll reply back when I know if I can get it working or not.
Well after wasting another 5 hours on this, only to find out that Visual Studio 2012 keeps giving me an error message saying that the <video> tag is not supported, it's clear that it's impossible to play videos in asp.net.
I'm converting this project to PHP, thanks for trying to help.
And now my entire website is broken, because Visual Studio will not let me publish anymore. Every time I try to publish I keep getting an error message:
Warning 1 Validation (HTML5): Element 'video' is not supported.
In the year 2012 you would think that ASP.Net would be able to play a video.
ASP.NET is fully capable of enabling video on a web page. There is something wrong with your configuration and we have not been provided enough information to help you identify the issue.
Visual Studio will display the error if you don't have the proper document type set for your HTML page. If you don't have an HTML 5 document type for the page then Visual Studio will give you this error. Other editors, even those for PHP, can do the same
thing. They are simply warning you about HTML tags that aren't supported by the document type you have provided.
Keep in mind, playing a video has absolutely nothing to do with PHP and ASP.Net if you are doing it in HTML. Nothing at all. Did you try jPlayer as I recommended?
To play a video you need a player. That's what jPlayer, FlowPlayer and others are for. They provide a framework for the container that holds a video and supports multiple browsers.
If you can't get it to work then there is something going on that has nothing to do with ASP.Net or Visual Studio or even PHP. If you give us a full sample page, or a url with the site in question that gives an error then we can actually help.
Don't forget to mark useful responses as Answer if they helped you towards a solution.
Marked as answer by Angie xu - MSFT on Dec 09, 2012 11:18 PM
markfitzme
Star
14323 Points
2217 Posts
Re: All I want to do is play a video OMG!!!!
Dec 03, 2012 03:30 PM|LINK
Try using the jPlayer jQuery plug-ing. (www.jplayer.org). You will have to name the mp4 file as m4v to get it to work. Whether you use PHP or ASP.Net is irrellevant since this is client-side stuff so neither of them should interfere.
You need a system that does two things. 1) can output the HTML 5 video element in order to support tablets which don't have flash support, and 2) a fallback flash player that supports browsers that do not support the HTML 5 video element.
jPlayer will do this. There are other options as well. The most popular being FlowPlayer (htttp://www.flowplayer.org). I used FlowPlayer extensively but the most recent release seems to be more of a complete re-tooling and doesn't work as well so I switched to jPlayer.
KJAK
Participant
1663 Points
473 Posts
Re: All I want to do is play a video OMG!!!!
Dec 03, 2012 06:36 PM|LINK
Mobile browsers are not going to work with Silverlight. There's more mobile support for Flash.
Firefox may not have supported MP4 video encoding until recently because of licensing fees associated with the video format. There are free tools to convert your video to an OGG (open source) file, which Firefox and others will be able to play. Then you modify the <video> tag to include a link to both versions like in the example on w3schools.com
KJAK
Kensino
Member
70 Points
185 Posts
Re: All I want to do is play a video OMG!!!!
Dec 03, 2012 08:33 PM|LINK
This sounds like the easiest solution. I'm going to try this and see if it works. I'll reply back when I know if I can get it working or not.
Thanks
Kensino
Member
70 Points
185 Posts
Re: All I want to do is play a video OMG!!!!
Dec 03, 2012 11:45 PM|LINK
Well after wasting another 5 hours on this, only to find out that Visual Studio 2012 keeps giving me an error message saying that the <video> tag is not supported, it's clear that it's impossible to play videos in asp.net.
I'm converting this project to PHP, thanks for trying to help.
Kensino
Member
70 Points
185 Posts
Re: All I want to do is play a video OMG!!!!
Dec 04, 2012 02:21 AM|LINK
And now my entire website is broken, because Visual Studio will not let me publish anymore. Every time I try to publish I keep getting an error message:
Warning 1 Validation (HTML5): Element 'video' is not supported.
In the year 2012 you would think that ASP.Net would be able to play a video.
pradeep shar...
Contributor
3988 Points
760 Posts
Re: All I want to do is play a video OMG!!!!
Dec 04, 2012 04:44 AM|LINK
http://techtt.org/post/2011/10/01/How-to-use-Media-Player-to-play-videos-in-ASPNET.aspx
KJAK
Participant
1663 Points
473 Posts
Re: All I want to do is play a video OMG!!!!
Dec 04, 2012 01:03 PM|LINK
ASP.NET is fully capable of enabling video on a web page. There is something wrong with your configuration and we have not been provided enough information to help you identify the issue.
Here is an article from Microsoft regarding HTML 5 support in Visual Studio => http://msdn.microsoft.com/en-us/magazine/hh335062.aspx
KJAK
markfitzme
Star
14323 Points
2217 Posts
Re: All I want to do is play a video OMG!!!!
Dec 04, 2012 01:16 PM|LINK
Visual Studio will display the error if you don't have the proper document type set for your HTML page. If you don't have an HTML 5 document type for the page then Visual Studio will give you this error. Other editors, even those for PHP, can do the same thing. They are simply warning you about HTML tags that aren't supported by the document type you have provided.
Keep in mind, playing a video has absolutely nothing to do with PHP and ASP.Net if you are doing it in HTML. Nothing at all. Did you try jPlayer as I recommended?
To play a video you need a player. That's what jPlayer, FlowPlayer and others are for. They provide a framework for the container that holds a video and supports multiple browsers.
If you can't get it to work then there is something going on that has nothing to do with ASP.Net or Visual Studio or even PHP. If you give us a full sample page, or a url with the site in question that gives an error then we can actually help.
foxjazzhack
Member
25 Points
16 Posts
Re: All I want to do is play a video OMG!!!!
Apr 16, 2013 05:52 AM|LINK
This works in chrom, but when I run IE 10 I get the "your browser does not support the video" message
I thought IE 10 or windows 8 was suppose to work.
foxJ
KJAK
Participant
1663 Points
473 Posts
Re: All I want to do is play a video OMG!!!!
Apr 16, 2013 02:41 PM|LINK
This is likely because you are not providing a video in a format that is supported by IE10.
http://msdn.microsoft.com/en-us/library/hh924821(v=vs.85).aspx
KJAK