Skip to content

Commit

Permalink
fix(flv/index.js): destroy flv when player distroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardoFu committed Aug 2, 2018
1 parent d24432f commit e90380b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/xgplayer-flv/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class FlvPlayer extends Player {
player.on('pause', () => {
!isLive && VodTask.clear()
})
this.once('destroy', () => {
VodTask.clear()
player.__flv__.destroy()
player.__flv__ = null
})
}

createInstance (flv) {
Expand Down

0 comments on commit e90380b

Please sign in to comment.