Skip to content

Commit

Permalink
buffer-controller: avoid using Object.assign() (undefined on Win8.1 -…
Browse files Browse the repository at this point in the history
… IE11)
  • Loading branch information
mangui committed Jan 19, 2018
1 parent 9c6f578 commit 23f159d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controller/buffer-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,11 @@ class BufferController extends EventHandler {
let pending = this.segments.reduce( (counter, segment) => (segment.parent === parent) ? counter + 1 : counter , 0);

// this.sourceBuffer is better to use than media.buffered as it is closer to the PTS data from the fragments
const bufferedEntries = Object.entries(this.sourceBuffer).map(([k,v]) => [k, v.buffered]);
let bufferedEntries = [];
const sourceBuffer = this.sourceBuffer;
for (let streamType in sourceBuffer) {
bufferedEntries.push([streamType, sourceBuffer[streamType].buffered]);
}
const timeRanges = new Map(bufferedEntries);

this.hls.trigger(Event.BUFFER_APPENDED, { parent, pending, timeRanges });
Expand Down

0 comments on commit 23f159d

Please sign in to comment.