xgplayer-streaming-shared
Advanced tools
Comparing version 3.0.19-rc.1 to 3.0.19-rc.2
@@ -52,2 +52,9 @@ export class Buffer { | ||
}; | ||
/** | ||
* | ||
* @param {HTMLMediaElement} media | ||
* @param {number} pos | ||
* @returns {Boolean} | ||
*/ | ||
static isBuffered(media: HTMLMediaElement, pos: number): boolean; | ||
} |
@@ -120,2 +120,17 @@ import { createClass as _createClass, classCallCheck as _classCallCheck } from "./_virtual/_rollupPluginBabelHelpers.js"; | ||
} | ||
}, { | ||
key: "isBuffered", | ||
value: function isBuffered(media, pos) { | ||
if (media) { | ||
var buffered = Buffer2.get(media); | ||
if (buffered !== null && buffered !== void 0 && buffered.length) { | ||
for (var i = 0; i < buffered.length; i++) { | ||
if (pos >= buffered.start(i) && pos <= buffered.end(i)) { | ||
return true; | ||
} | ||
} | ||
} | ||
} | ||
return false; | ||
} | ||
}]); | ||
@@ -122,0 +137,0 @@ return Buffer2; |
{ | ||
"name": "xgplayer-streaming-shared", | ||
"version": "3.0.19-rc.1", | ||
"version": "3.0.19-rc.2", | ||
"main": "dist/index.min.js", | ||
@@ -5,0 +5,0 @@ "module": "es/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
373730
4852