RobGMiller Posted July 30, 2015 Share Posted July 30, 2015 (edited) Added the following HTML5 Video tag to an aspx page. The tag is not recognized on this page in IE11 but it works as expected with chrome. <video width="400" height="300" controls="controls"> <source src="/InstructionVideo.mp4" type='video/mp4;codecs="avc1.4D401E, mp4a.40.2"' /> Your browser does not support the video tag. </video> The W3Schools Video (Try it yourself) page works as expected in IE11. If this markup is added to a simple html file it works as expected in IE11. This application page contains a lot of other markup and javascript, including a fair amount of dynamic page element manipulation in the Page_Load. In addition, if the simple html file is launched from the aspx file using <a href="/InstructionVideo.html"> it doesn't work. If the simple html file is launched in a different window from the aspx file using <a onClick="window.open('InstructionVideo.html')"> it doesn't work. So, the question is; What kind of code can be present on an aspx page that might prevent the HTML5 Video tag from rendering properly? Edited July 30, 2015 by RobGMiller Link to comment Share on other sites More sharing options...
dsonesuk Posted July 30, 2015 Share Posted July 30, 2015 Place a space between video/mp4; and codecs as some browsers can be temperamental about such minor things like that, especially IE. Link to comment Share on other sites More sharing options...
RobGMiller Posted July 31, 2015 Author Share Posted July 31, 2015 Thanks for the reply but that made no difference. It should work without the codecs specification according to the w3schools test page which does work. If I use the <source tag without the end tag />, the Visual Studio error detector tells me "Validation (XHTML5): Empty elements such as 'source' must end with />" Could this be an issue? Link to comment Share on other sites More sharing options...
dsonesuk Posted July 31, 2015 Share Posted July 31, 2015 There is no reason to use XHTML5, we need to see whole code to see doctype etc used Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now