Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE9 Running on Windows Server SKU can cause an exception to be thrown #224

Closed
osbornm opened this issue Mar 17, 2011 · 9 comments
Closed
Milestone

Comments

@osbornm
Copy link

osbornm commented Mar 17, 2011

If you are running IE9 on a windows server SKU without the "desktop experience" installed the "CanPlayType" method will throw a not implemented exception that will cause the modernizr script to fail.

Here is a simple repro that can be used on a machine running a default install of Windows Server 2008 R2 with IE9 RTM installed:

 <video id="video" />
 <script type="text/javascript">
    var v = document.getElementById("video");
    var ans = v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')
 </script>
@paulirish
Copy link
Member

Eessh.

Can you file a ticket on IE's Connect website and report back here with the link?

Thanks!

@osbornm
Copy link
Author

osbornm commented Mar 17, 2011

The Connect site for IE9 was closed after it RTM'd. I did however contact a PM on the IE9 team (I work on the ASP.NET MVC team) and I will fill you in more when I hear back from him. For now modernizr could wrap those calls in a try catch because if anything errors out I would expect it to just say no it isn't supported.

@osbornm
Copy link
Author

osbornm commented Mar 24, 2011

Hey Paul,

This is a known issue for IE9.
http://msdn.microsoft.com/en-us/ie/ff959805.aspx says...
"On Windows Server 2008, you will need to enable the Desktop Experience feature prior to installing Internet Explorer 9 prerequisite KB2117917. Without enabling Desktop Experience, Internet Explorer 9 will not have HTML5 video and audio playback support.
For more information, see the following articles in the Microsoft Knowledge Base:
http://support.microsoft.com/kb/2117917"

It sounds like that the best bet for now would be for there to be a try catch block around this call and treat a exception as false.

@paulirish
Copy link
Member

lol.

that is so effing weak.

aiight thanks for digging into that osbornm. I'll either document the problem or try/catch it.

@KuraFire
Copy link
Member

I suggest both: try/catch it in the code and document it briefly in a comment around it, and then we'll include more detailed info in the full documentation. What a pain, IE9.

@paulirish
Copy link
Member

i think #110 is a dupe of this one..

@grahf you can test out the version i'm about to land...

@osbornm
Copy link
Author

osbornm commented May 20, 2011

Awesome thanks for getting this fix in. When is the time frame for the release of Modernizr 2? Do you have a date yet?

@paulirish
Copy link
Member

Right now we're trying to get it out for Monday... :)

so if not then, then quite soon

@grahf
Copy link

grahf commented May 20, 2011

Looks like it works. Thanks.

ryanseddon added a commit that referenced this issue Oct 6, 2013
…missing

Desktop Experience feature or quicktime respectively. More info #224

* Wrapped the test in a try catch like it is in the video test.
josephsavona pushed a commit to josephsavona/SoundManager2 that referenced this issue Jan 20, 2014
…ase without "desktop experience" installed, means missing HTML5 audio/video support. Hat tip: Modernizr/Modernizr#224
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
… in some rare cases. details:

it seems that if you don't have the "Desktop Experience" installed, using elem.canPlayType()
will throw an exception. Awesome!

So we try/catch it. It's okay, they're cheap.

I'm doing a little bit of magic with an assignment inside my if() conditional. I hope nobody minds, too much.

Fixes Modernizr#224
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
…missing

Desktop Experience feature or quicktime respectively. More info Modernizr#224

* Wrapped the test in a try catch like it is in the video test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants