Skip to content

Commit

Permalink
fix Audio object for Opera 10 and more
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Jun 28, 2012
1 parent 5ef153a commit f500fc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions script/soundmanager2-nodebug.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions script/soundmanager2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());

}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f500fc2

Please sign in to comment.