Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snowinszu committed May 10, 2018
1 parent 6aa931b commit dfea7d7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions dist/pear-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -21172,7 +21172,7 @@ module.exports = function zeroFill (width, number, pad) {
},{}],146:[function(require,module,exports){
module.exports={
"name": "pearplayer",
"version": "2.5.6",
"version": "2.5.7",
"description": "",
"main": "./dist/pear-player.js",
"dependencies": {
Expand Down Expand Up @@ -25229,7 +25229,7 @@ Validator.prototype.validate = function (data, index) {
var hash = sha1.sync(data);
var equal = hash === this.piecesHash[index];
if (!equal) {
console.warn(`buffer validate fail ${index} hash ${hash} ref ${this.piecesHash[index]}`);
console.warn(`[HashValidateError] buffer validate fail ${index} hash ${hash} ref ${this.piecesHash[index]}`);
}

return equal;
Expand Down Expand Up @@ -26368,7 +26368,9 @@ Worker.prototype._getNodes = function (token, cb) {
var length = nodes.length;
// debug('nodes:'+JSON.stringify(nodes));

self._debugInfo.usefulHTTPAndHTTPS = self._debugInfo.totalHTTPS;
// self._debugInfo.usefulHTTPAndHTTPS = self._debugInfo.totalHTTPS;
self._debugInfo.usefulHTTPAndHTTPS = length;
// console.warn('totalHTTPS:' + self._debugInfo.totalHTTPS + ' usefulHTTPAndHTTPS:' + length);
if (length) {
// self.fileLength = fileLength;
// debug('nodeFilter fileLength:'+fileLength);
Expand Down
2 changes: 1 addition & 1 deletion dist/pear-player.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/player-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
BTMode: false, //是否开启纯BT下载模式(基于webtorrent),默认false,
debug: true, //是否开启debug模式,开启后可以在console中查看log,默认false
algorithm: 'pull', //下载算法,有‘push’和‘pull’两种,默认‘pull’
geoEnabled: true //是否开启geo接口,默认false
geoEnabled: false //是否开启geo接口,默认false
});

player.on('fallback', onFallback); //播放器出现异常时的回调函数
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pearplayer",
"version": "2.5.6",
"version": "2.5.8",
"description": "",
"main": "./dist/pear-player.js",
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ Worker.prototype._getNodes = function (token, cb) {
var length = nodes.length;
// debug('nodes:'+JSON.stringify(nodes));

self._debugInfo.usefulHTTPAndHTTPS = self._debugInfo.totalHTTPS;
// self._debugInfo.usefulHTTPAndHTTPS = self._debugInfo.totalHTTPS;
self._debugInfo.usefulHTTPAndHTTPS = length;
// console.warn('totalHTTPS:' + self._debugInfo.totalHTTPS + ' usefulHTTPAndHTTPS:' + length);
if (length) {
// self.fileLength = fileLength;
// debug('nodeFilter fileLength:'+fileLength);
Expand Down

0 comments on commit dfea7d7

Please sign in to comment.