Skip to content

Commit

Permalink
Clean up existing video player on exit event (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzheng547 authored Dec 10, 2018
1 parent 939284f commit 13d6351
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/views/player-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@

// VideoJS reference
var vid = videojs('zype_' + video.id.toString() + '-' + seconds);
this.on('exit', function(){
vid.dispose();
}, this);

// add Akamai analytics
vid.akamaiAnalytics({
Expand Down

0 comments on commit 13d6351

Please sign in to comment.