Skip to content

Commit

Permalink
Reset hls and dash before loading new url
Browse files Browse the repository at this point in the history
Fixes #892
Closes #874
  • Loading branch information
cookpete committed May 23, 2020
1 parent 55cd243 commit d5f1a42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/players/FilePlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ export default class FilePlayer extends Component {

load (url) {
const { hlsVersion, hlsOptions, dashVersion } = this.props.config
if (this.hls) {
this.hls.destroy()
}
if (this.dash) {
this.dash.reset()
}
if (this.shouldUseHLS(url)) {
getSDK(HLS_SDK_URL.replace('VERSION', hlsVersion), HLS_GLOBAL).then(Hls => {
this.hls = new Hls(hlsOptions)
Expand Down

0 comments on commit d5f1a42

Please sign in to comment.