   #    try to find built-in flash player.
   # 3. If 2 failed, try to find Google Chrome integrated flash player.
   # 4. If 3 failed, try to find globally installed flash player.
-  switch loc
+  switch loc.toLowerCase()
     when 'auto'
       flashPath = getBuiltInFlashPath()
       flashPath ?= findChromeFlashPath()


if process.type is 'browser'
  exports.parseCLIArg = parseCLIArg
  exports.loadFlashPlayer = load

exports.getFlashPlayerVersion = getFlashVersion
exports.getAllVersions = getAllVersions


useFlashLoc = 'auto'
CLIFlashPath = ''
reCLIArg = /^--flash=(.+)$/i
parseCLIArg = (arg) ->
  if (m = reCLIArg.exec arg)?
    value = m[1]
