Skip to content

Commit

Permalink
fix: disconnetcTime use buffer time instead buffer edge
Browse files Browse the repository at this point in the history
  • Loading branch information
wudechang committed Jul 11, 2024
1 parent 5fb1940 commit ab66fcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/xgplayer-flv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xgplayer-flv",
"version": "3.0.19-rc.9",
"version": "3.0.19-rc.10",
"main": "dist/index.min.js",
"module": "es/index.js",
"typings": "es/index.d.ts",
Expand Down Expand Up @@ -30,4 +30,4 @@
"xgplayer": ">=3.0.1",
"core-js": ">=3.12.1"
}
}
}
2 changes: 1 addition & 1 deletion packages/xgplayer-flv/src/flv/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ export class Flv extends EventEmitter {
}
return
}
if (opts.isLive && media.readyState === 4 && bufferEnd > opts.disconnectTime) {
if (opts.isLive && media.readyState === 4 && (bufferEnd - media.currentTime) > opts.disconnectTime) {
this.disconnect()
}
}
Expand Down

0 comments on commit ab66fcc

Please sign in to comment.