Skip to content

Commit f6b8fea

Browse files
committed
Merge branch 'master' of https://github.com/smidgen/jPlayer into smidgen-issue-239
2 parents 446af5d + f2c9f81 commit f6b8fea

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/javascript/jplayer/jquery.jplayer.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,16 @@
243243
ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
244244
[];
245245

246-
return { browser: match[1] || "", version: match[2] || "0" };
246+
var oRet = { browser: match[1] || "", version: match[2] || "0" };
247+
248+
var rchrome = /(chrome)[ \/]([\w.]+)/;
249+
var matchChrome = rchrome.exec(ua) || [];
250+
251+
if (matchChrome[1]) {
252+
oRet.chromeVersion = matchChrome[2];
253+
}
254+
255+
return oRet;
247256
};
248257

249258
// Platform sniffer for detecting mobile devices
@@ -277,6 +286,9 @@
277286
if ( browserMatch.browser ) {
278287
$.jPlayer.browser[ browserMatch.browser ] = true;
279288
$.jPlayer.browser.version = browserMatch.version;
289+
if (typeof(browserMatch.chromeVersion) != 'undefined') {
290+
$.jPlayer.browser.chromeVersion = browserMatch.chromeVersion;
291+
}
280292
}
281293
var platformMatch = $.jPlayer.uaPlatform(navigator.userAgent);
282294
if ( platformMatch.platform ) {
@@ -1764,7 +1776,7 @@
17641776
_absoluteMediaUrls: function(media) {
17651777
var self = this;
17661778
$.each(media, function(type, url) {
1767-
if(url && self.format[type]) {
1779+
if(url && self.format[type] && url.substr(0, 5) != 'data:') {
17681780
media[type] = self._qualifyURL(url);
17691781
}
17701782
});
@@ -1830,8 +1842,8 @@
18301842
self._html_setAudio(media);
18311843
self.html.active = true;
18321844

1833-
// Setup the Android Fix - Only for HTML audio.
1834-
if($.jPlayer.platform.android) {
1845+
// Setup the Android Fix - Only for HTML audio. And it's not needed not for Chrome 37+.
1846+
if ( $.jPlayer.platform.android && !(typeof($.jPlayer.browser.chromeVersion) != 'undefined' && parseInt($.jPlayer.browser.chromeVersion) >= 37) ) {
18351847
self.androidFix.setMedia = true;
18361848
}
18371849
} else {

0 commit comments

Comments
 (0)