Skip to content

Commit

Permalink
detach media commit on provider detach
Browse files Browse the repository at this point in the history
  • Loading branch information
nvedenyuk committed May 28, 2017
1 parent 8914629 commit 82a7b85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hola.org/jwplayer-hlsjs",
"description": "hls.js provider for jwplayer",
"version": "0.0.69",
"version": "0.0.70",
"license": "ISC",
"homepage": "https://github.com/hola/jwplayer-hlsjs",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion src/jwplayer.hlsjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,14 @@ E.attach = function(){
}
};

E.detach = function(){
E.detach = function(hp){
// we don't remove provider from list, just set it as disabled so it will
// return false in supports()
E.disabled = true;
if (!hp || !hp.attached)
return;
hp.setState('idle');
hp.detachMedia();
};

// XXX vadiml copied from loader.js&zjwplayer3.js to not depend on our code.
Expand Down

0 comments on commit 82a7b85

Please sign in to comment.