Merge pull request #145 from UniversityRadioYork/mstratford-ram2
Update Wavesurfer to fix Ram Leak on .destroy()
This commit is contained in:
commit
168ac48d70
3 changed files with 14 additions and 10 deletions
|
@ -23,7 +23,7 @@
|
|||
"@types/reactstrap": "^8.4.2",
|
||||
"@types/redux-persist": "^4.3.1",
|
||||
"@types/sdp-transform": "^2.4.3",
|
||||
"@types/wavesurfer.js": "^3.2.0",
|
||||
"@types/wavesurfer.js": "^3.3.1",
|
||||
"@types/webpack-env": "^1.14.1",
|
||||
"@typescript-eslint/eslint-plugin": "^2.2.0",
|
||||
"@typescript-eslint/parser": "^2.2.0",
|
||||
|
@ -99,7 +99,7 @@
|
|||
"ts-pnp": "1.1.4",
|
||||
"typescript": "3.7.2",
|
||||
"url-loader": "2.1.0",
|
||||
"wavesurfer.js": "3.3.3",
|
||||
"wavesurfer.js": "4.0.1",
|
||||
"webpack": "4.41.0",
|
||||
"webpack-dev-server": "3.2.1",
|
||||
"webpack-manifest-plugin": "2.1.1",
|
||||
|
|
|
@ -151,7 +151,11 @@ class Player extends ((PlayerEmitter as unknown) as { new (): EventEmitter }) {
|
|||
}
|
||||
|
||||
cleanup() {
|
||||
// Unsubscribe from events.
|
||||
this.wavesurfer.unAll();
|
||||
// Let wavesurfer remove the old media, otherwise ram leak!
|
||||
// See https://github.com/katspaugh/wavesurfer.js/issues/1940.
|
||||
delete (this.wavesurfer as any).backend.buffer;
|
||||
this.wavesurfer.destroy();
|
||||
}
|
||||
}
|
||||
|
|
16
yarn.lock
16
yarn.lock
|
@ -1688,10 +1688,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
|
||||
integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==
|
||||
|
||||
"@types/wavesurfer.js@^3.2.0":
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/wavesurfer.js/-/wavesurfer.js-3.3.0.tgz#79b22405a305cac1acfc19d648574d032b16ca92"
|
||||
integrity sha512-OqxmEUl2CP1G5tl1jj1huzo/38FiWpDyS1woI/Hu6S9wsLJ2ihcimAAjdQlwNtXDl2CjVBDl4dVoHN8XTX8eSQ==
|
||||
"@types/wavesurfer.js@^3.3.1":
|
||||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/wavesurfer.js/-/wavesurfer.js-3.3.1.tgz#e276ca371b382072b894b57a166c5f6ecdfb4964"
|
||||
integrity sha512-TpWT5eW57ZyhH7uOlHBAnQ+kpp5f+lyjaoGSYk5q447U9ulIOm5eUURiYBIZUlIZqrL0Levaniq8flnug0ir0w==
|
||||
|
||||
"@types/webpack-env@^1.14.1":
|
||||
version "1.15.2"
|
||||
|
@ -11119,10 +11119,10 @@ watchpack@^1.6.0:
|
|||
chokidar "^3.4.0"
|
||||
watchpack-chokidar2 "^2.0.0"
|
||||
|
||||
wavesurfer.js@3.3.3:
|
||||
version "3.3.3"
|
||||
resolved "https://registry.yarnpkg.com/wavesurfer.js/-/wavesurfer.js-3.3.3.tgz#9b16a62335c6bd13a3d55deb895a336d027ccb51"
|
||||
integrity sha512-meko20S9in+V5xBLSVV/9uYVBSbx5AsJNkAslZ+a5yYIeFGYwcCo4Yd1sUpSGaiNnyflzrJwC7x7TdJFYrdT8w==
|
||||
wavesurfer.js@4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/wavesurfer.js/-/wavesurfer.js-4.0.1.tgz#392502f4956fc96cff9dbb0fccdc9debfaed4e97"
|
||||
integrity sha512-MvFVjxGVstYZqRI/BzkGupRuB1S7MtQClWPqgjTBTg+2ssxUAJlOGFhZsrtxDvCocneuWXqZ0g+sm/8OGl7X1w==
|
||||
|
||||
wbuf@^1.1.0, wbuf@^1.7.3:
|
||||
version "1.7.3"
|
||||
|
|
Loading…
Reference in a new issue