Skip to content

Commit 3824f02

Browse files
committed
Destroy previous vidyard player before creating new one
1 parent 32bb251 commit 3824f02

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/players/Vidyard.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export default class Vidyard extends Component {
1818
load (url, isReady) {
1919
const { config, onError, onDuration } = this.props
2020
const id = url && url.match(MATCH_URL_VIDYARD)[1]
21+
if (this.player) {
22+
this.stop()
23+
delete this.player
24+
}
2125
getSDK(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then(Vidyard => {
2226
if (!this.container) return
2327
Vidyard.api.addReadyListener((data, player) => {

0 commit comments

Comments
 (0)