video.js icon indicating copy to clipboard operation
video.js copied to clipboard

Add an "Unsupported Browser" modal dialog for unsupported browsers

Open tinwatchman opened this issue 10 years ago • 5 comments

So here's a fun one for you... so you know how you guys are parsing the user agent string to determine whether or not a browser is IE8? The problem is that -- on _INTRA_net sites, as in on an internal network -- IE8 by default goes into Compatibility Mode. Which means its user string actually looks like this:

ie8compatmodeuseragent

Meaning the user string check fails -- meaning the code generates a whole bunch of errors afterwards, since the script doesn't know it's running in IE8. I would suggest either relying on feature detection for this, or otherwise (for a quick fix) update line 408 (or thereabouts) in lib.js from this:

var IS_IE8 = (/MSIE\s8\.0/).test(USER_AGENT);

to this:

var IS_IE8 = (/MSIE\s(7|8)\.0/).test(USER_AGENT);

If only to spare some poor idiot out there the same path I've been dealing with all afternoon here.

tinwatchman avatar Apr 16 '15 20:04 tinwatchman

That's interesting. I'm pretty positive we don't support compatibility mode, so we should probably detect this case specifically and show an error.

Sent from mobile

heff avatar Apr 17 '15 19:04 heff

I would agree with Tinwatchman, that the detection should at least be sane. I have used the Tim Downs answer from stackoverflow and I think it's pretty bulletproof: http://stackoverflow.com/questions/10964966/detect-ie-version-prior-to-v9-in-javascript

EZWrighter avatar Apr 24 '15 16:04 EZWrighter

Would anyone want to a PR for "Unsupported Browser" Modal dialog for vjs 5?

gkatsev avatar Nov 17 '15 23:11 gkatsev

Updating the title to "Unsupported Browser" modal.

gkatsev avatar Mar 28 '16 22:03 gkatsev

@gkatsev I think this is no longer valid as IE support has been deprecated.

damanV5 avatar Feb 25 '25 08:02 damanV5