Skip to content

Commit

Permalink
Merge pull request #1676 from bikubi/fix-opera-v100-codec-mp3
Browse files Browse the repository at this point in the history
fix old opera detection for three digit version numbers (100+)
  • Loading branch information
goldfire committed Sep 19, 2023
2 parents 9610df8 + aceef4e commit cf2969c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@

// Opera version <33 has mixed MP3 support, so we need to check for and block it.
var ua = self._navigator ? self._navigator.userAgent : '';
var checkOpera = ua.match(/OPR\/([0-6].)/g);
var checkOpera = ua.match(/OPR\/(\d+)/g);
var isOldOpera = (checkOpera && parseInt(checkOpera[0].split('/')[1], 10) < 33);
var checkSafari = ua.indexOf('Safari') !== -1 && ua.indexOf('Chrome') === -1;
var safariVersion = ua.match(/Version\/(.*?) /);
Expand Down

0 comments on commit cf2969c

Please sign in to comment.