Skip to content

Commit 1f38a89

Browse files
author
Lanny McNie
committed
Fixed issue with browser detection.
Also addressed incorrect versions file.
1 parent eab1c81 commit 1f38a89

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/soundjs/Sound.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,13 +1665,13 @@ this.createjs = this.createjs || {};
16651665
}
16661666

16671667
BrowserDetect.init = function () {
1668-
var agent = navigator.userAgent;
1669-
BrowserDetect.isFirefox = (createjs.indexOf(agent, "Firefox") > -1);
1668+
var agent = window.navigator.userAgent;
1669+
BrowserDetect.isFirefox = (agent.indexOf("Firefox") > -1);
16701670
BrowserDetect.isOpera = (window.opera != null);
1671-
BrowserDetect.isChrome = (createjs.indexOf(agent, "Chrome") > -1); // NOTE that Chrome on Android returns true but is a completely different browser with different abilities
1672-
BrowserDetect.isIOS = createjs.indexOf(agent, "iPod") > -1 || createjs.indexOf(agent, "iPhone") > -1 || createjs.indexOf(agent, "iPad") > -1;
1673-
BrowserDetect.isAndroid = (createjs.indexOf(agent, "Android") > -1);
1674-
BrowserDetect.isBlackberry = (createjs.indexOf(agent, "Blackberry") > -1);
1671+
BrowserDetect.isChrome = (agent.indexOf("Chrome") > -1); // NOTE that Chrome on Android returns true but is a completely different browser with different abilities
1672+
BrowserDetect.isIOS = agent.indexOf("iPod") > -1 || agent.indexOf("iPhone") > -1 || agent.indexOf("iPad") > -1;
1673+
BrowserDetect.isAndroid = (agent.indexOf("Android") > -1);
1674+
BrowserDetect.isBlackberry = (agent.indexOf("Blackberry") > -1);
16751675
}
16761676

16771677
BrowserDetect.init();

src/soundjs/version_flashplugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ this.createjs = this.createjs || {};
1414
* @type String
1515
* @static
1616
**/
17-
o.version = /*version*/"NEXT"; // injected by build process
17+
s.version = /*version*/"NEXT"; // injected by build process
1818

1919
/**
2020
* The build date for this release in UTC format.
@@ -23,6 +23,6 @@ this.createjs = this.createjs || {};
2323
* @type String
2424
* @static
2525
**/
26-
o.buildDate = /*date*/"Fri, 11 Jan 2013 22:39:59 GMT"; // injected by build process
26+
s.buildDate = /*date*/"Fri, 11 Jan 2013 22:39:59 GMT"; // injected by build process
2727

2828
})();

0 commit comments

Comments
 (0)