Permalink
Browse files

fix Audio object for Opera 10 and more

  • Loading branch information...
1 parent 5ef153a commit f500fc2375b7ac09e32bd7ef5b8214b78d5f72da @Gemorroj committed Jun 28, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 script/soundmanager2-nodebug.js
  2. +2 −2 script/soundmanager2.js
@@ -1207,7 +1207,7 @@ function SoundManager(smURL, smID) {
if (_iO.autoLoad || _iO.autoPlay) {
_t._a = new Audio(_iO.url);
} else {
- _t._a = (_isOpera ? new Audio(null) : new Audio());
+ _t._a = (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio());
}
_a = _t._a;
_a._called_load = false;
@@ -1717,7 +1717,7 @@ function SoundManager(smURL, smID) {
if (!_s.useHTML5Audio || typeof Audio === 'undefined') {
return false;
}
- var a = (typeof Audio !== 'undefined' ? (_isOpera ? new Audio(null) : new Audio()) : null),
+ var a = (typeof Audio !== 'undefined' ? (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio()) : null),
item, lookup, support = {}, aF, i;
function _cp(m) {
var canPlay, i, j,
View
@@ -2704,7 +2704,7 @@ function SoundManager(smURL, smID) {
} else {
// null for stupid Opera 9.64 case
- _t._a = (_isOpera ? new Audio(null) : new Audio());
+ _t._a = (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio());
}
@@ -3802,7 +3802,7 @@ function SoundManager(smURL, smID) {
}
// double-whammy: Opera 9.64 throws WRONG_ARGUMENTS_ERR if no parameter passed to Audio(), and Webkit + iOS happily tries to load "null" as a URL. :/
- var a = (typeof Audio !== 'undefined' ? (_isOpera ? new Audio(null) : new Audio()) : null),
+ var a = (typeof Audio !== 'undefined' ? (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio()) : null),
item, lookup, support = {}, aF, i;
function _cp(m) {

0 comments on commit f500fc2

Please sign in to comment.