title: feature test for html5 audio restrictions in iOS?
body: <p>I know that you can't alter (or mute) the volume of HTML5 audio elements in iOS so I'm looking for a way to test for this (so that I can remove UI elements related to the volume). </p>
  
  <p>After reading: </p>
  
  <p><a href="http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW10" rel="nofollow">http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW10</a></p>
  
  <p>Specifically: </p>
  
  <p>"On iOS devices, the audio level is always under the user’s physical control. The volume property is not settable in JavaScript. Reading the volume property always returns 1." </p>
  
  <p>I figured that I could create a new Audio object, attempt to change the volume to something other than 1 and then test the volume. i.e. : </p>
  
  <pre><code>var isIOS = false; 
  var test = new Audio(); 
  test.volume = 0.5; 
  if (test.volume === 1) { 
      isIOS = true; 
  } 
  </code></pre>
  
  <p>I was just wondering if anyone knew of any possible problems with this, and/or had a better solution. Is there a chance of false positives?</p>
  
  <p>Additionally, does anyone know of any other devices that don't allow volume changes but that don't implement it in this way?</p>
  
  <p>cheers.</p>