Skip to content

Commit

Permalink
revert isBuffered changes
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Jan 30, 2018
1 parent 03aa7ec commit 0004c69
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/helper/buffer-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@ const BufferHelper = {
* @param {number} position
* @returns {boolean}
*/
isBuffered: function(media,position) {
isBuffered : function(media,position) {
try {
if (media) {
const mediaBuffered = media.buffered;
for (let i = 0; i < mediaBuffered.length; i++) {
if (position >= mediaBuffered.start(i) && position <= mediaBuffered.end(i)) {
let buffered = media.buffered;
for (let i = 0; i < buffered.length; i++) {
if (position >= buffered.start(i) && position <= buffered.end(i)) {
return true;
}
}
return false;
}
} catch(error) {
// this is to catch
Expand All @@ -57,6 +56,7 @@ const BufferHelper = {
}
return false;
},

bufferInfo : function(media, pos,maxHoleDuration) {
try {
if (media) {
Expand Down

0 comments on commit 0004c69

Please sign in to comment.