Destroy previous vidyard player before creating new one#894
Merged
cookpete merged 2 commits intocookpete:masterfrom May 23, 2020
Merged
Conversation
Contributor
Author
|
@cookpete could you pls review this pr, it's quite important in my work |
3824f02 to
0973658
Compare
0973658 to
5d22a19
Compare
cookpete
reviewed
May 23, 2020
|
|
||
| stop () { | ||
| window.VidyardV4.api.destroyPlayer(this.player) | ||
| delete this.player |
Contributor
Author
There was a problem hiding this comment.
@cookpete I think it's logical. If you destroy object and this.player doesn't exist, you don't need to keep reference to non-existing object.
Owner
There was a problem hiding this comment.
I’ve merged this but left this line out for the time being. I’m not a fan of the delete statement and would rather be consistent with the rest of the codebase (which avoids calling delete anywhere)
Contributor
Author
There was a problem hiding this comment.
ok clear :) any case, I checked new release with fix and works well
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had met a bug, that
react-playercalls several timeVidyard.api.renderPlayerif i switch video, which leads severalvidyardplayers presence in same page.Fix is to destroy previous player before creating new one.