Iframe not refreshing when [videoId] changes
omarlopesino opened this issue · comments
Hi.
I am using this component in my app in this way
<youtube-player *ngIf="customVideoId != null" [videoId]="customVideoId" [width]="480" [height]="360"></youtube-player>
But when customVideoId variable changes the iframe doesn't reload. The attribute [videoId] is reloaded, but iframe not.
If you give me some guideline to make a PR I can try.
it should work with an empty string though - try that and let me know.
Not working for me also :(
This also happens with the height and width properties, I would like that when these properties are changed, those of the iframe will also be loaded, for responsive effects.
regards
Still happens with dynamic: videoId, height, width.
hi @mistermoper
After inspecting this issue, I decided to mark it as not a bug.
it requires interacting with the player object received from the "ready" event, and more development on the component side.
For custom development regarding this - please contact me (details in README.md).
You must use the loadVideoById()
function of player object to update Iframe content dynamically
closing - reopen to contact.