Jump to content

Handling when a browser doesn't support X, Y or Z


anthony
 Share

Recommended Posts

Hi all,

 

I'm curious to know how people handle when a Player's browser doesn't support an API that your game might use? To give an example:

 

I have an iPad and an iPhone so I wrote a breakout clone that uses the Web Audio API for handling sounds and it works pretty well on both devices. When I asked some friends to test it on their various Android devices I found out none of their phones support the Web Audio API. 

 

I understand there are fallbacks that could be used like maybe SoundManager for audio, but what I'm talking in more general terms of handling feature support.

 

I suppose it is a matter of personal preference, but should you inform the Player that something is missing like that or simply disable functionality using that feature and continue on as normal (provided the game play isn't affected).

 

Thanks,

 

Anthony

Link to comment
Share on other sites

WebAudio is a rather new feature. It was just added to iOS Safari with Version 6 afair. You should always use a fallback to normal audio that's for sure. Simply use the default Audio. To position the sound in the fallback (Breakout is a kinda centered game so positioned sound is not tha important, or for what do you use the API in general?) use the volume of a sound.  

 

You can check if webaudio is supported via the AudioContext:

if(window["webkitAudioContext"]) {    // webaudio is supported} else {    // webaudio is not supported}
Link to comment
Share on other sites

Thanks for the replies  :)

 

I'm aware of the fallbacks for various functionality. I was wondering in a more general sense what people do when a something just isn't supported. Going forward I intend to disable the unsupported functionality if the game can still be played otherwise display a message that key functionality is missing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...