Fail more gracefully on pre-IE9 browsers (still room for improvement though)

This commit is contained in:
Jeff Parsons 2015-04-25 12:54:03 -07:00 committed by jeffpar
commit fcb7c32909
6 changed files with 43 additions and 9 deletions

View file

@ -541,8 +541,8 @@ C1PVideo.init = function()
* "autocapitalize" work here.
*/
var eCanvas = window.document.createElement("canvas");
if (eCanvas === undefined) {
eVideo.innerHTML = "<br/>Missing &lt;canvas&gt; support; try a new web browser.";
if (eCanvas === undefined || !eCanvas.getContext) {
eVideo.innerHTML = "<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";
return;
}
eCanvas.setAttribute("class", C1PJSCLASS + "-canvas");