I’m writing a small experimental app that uses WebRTC and Web Speech API (https://webrtc-translate.herokuapp.com) and I was wondering where’s the best place to check for browser compatibility (unfortunately currently only desktop Chrome is supported) and show some custom template with error message without changing the URL.
I tried adding custom
renderTemplate method to the route that requires all these APIs to check if everything is supported and rendering custom template if it’s not (
this.render('unsupported')), but it still instantiates this route’s controller, which assumes these APIs are available. Is there a way to avoid doing the check twice in the route and its controller?