Skip to content

Commit

Permalink
stream-controller: fix 'seek near the end and receive video ended eve…
Browse files Browse the repository at this point in the history
…nt for MP3 VOD demo' on MS Edge
  • Loading branch information
mangui committed Feb 1, 2017
1 parent 0ff3e81 commit 52706e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/stream-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ class StreamController extends EventHandler {
// if everything (almost) til the end is buffered, let's signal eos
// we don't compare exactly media.duration === bufferInfo.end as there could be some subtle media duration difference
// using half frag duration should help cope with these cases.
// also cope with almost zero last frag duration (max last frag duration with 100ms) refer to https://github.com/dailymotion/hls.js/pull/657
if (media.duration - Math.max(bufferInfo.end,fragPrevious.start) <= Math.max(0.1,fragPrevious.duration/2)) {
// also cope with almost zero last frag duration (max last frag duration with 200ms) refer to https://github.com/dailymotion/hls.js/pull/657
if (media.duration - Math.max(bufferInfo.end,fragPrevious.start) <= Math.max(0.2,fragPrevious.duration/2)) {
// Finalize the media stream
let data = {};
if (this.altAudio) {
Expand Down

0 comments on commit 52706e7

Please sign in to comment.