Skip to content

Commit

Permalink
don't stack event listeners (#1186)
Browse files Browse the repository at this point in the history
* don't stack event listeners

* Fix lint
  • Loading branch information
thomas-short committed May 7, 2022
1 parent bc8fe6b commit 80b2da1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/players/Vidyard.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export default class Vidyard extends Component {
getSDK(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then(Vidyard => {
if (!this.container) return
Vidyard.api.addReadyListener((data, player) => {
if (this.player) {
return
}
this.player = player
this.player.on('ready', this.props.onReady)
this.player.on('play', this.props.onPlay)
Expand Down

0 comments on commit 80b2da1

Please sign in to comment.