From 25dfa41b7ac9d0f06238ea2f5ae3e0c1de6df04e Mon Sep 17 00:00:00 2001 From: Jacob Trimble Date: Mon, 6 Jun 2016 09:23:07 -0700 Subject: [PATCH] Fix basic tutorial WRT support testing. Issue #399 Issue #402 Change-Id: I930377252a5e7fbce84db76c40a6f3607e3f24a5 --- docs/tutorials/basic-usage.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/tutorials/basic-usage.md b/docs/tutorials/basic-usage.md index 42129bf9d..4ae3d022c 100644 --- a/docs/tutorials/basic-usage.md +++ b/docs/tutorials/basic-usage.md @@ -39,17 +39,13 @@ function initApp() { shaka.polyfill.installAll(); // Check to see if the browser supports the basic APIs Shaka needs. - // This is an asynchronous check. - shaka.Player.support().then(function(support) { - // This executes when the asynchronous check is complete. - if (support.supported) { - // Everything looks good! - initPlayer(); - } else { - // This browser does not have the minimum set of APIs we need. - console.error('Browser not supported!'); - } - }); + if (shaka.Player.isBrowserSupported()) { + // Everything looks good! + initPlayer(); + } else { + // This browser does not have the minimum set of APIs we need. + console.error('Browser not supported!'); + } } function initPlayer() {