-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Change video id #23
Comments
Not currently. I have PR #28 open which is a basic first-pass at allowing for this to work. |
@guillermo7227 i know it's been a while.. but i'm interested in understanding this usecase a little more.. presumably you have something like a ... social video/music jukebox.. and new videos play often.. so you'd want to change the video id from script? it seems like you'd also need to know when the current video finished.. right? is there another usecase i'm not considering? |
There could also be the case of say a video course. A list of available videos would show somewhere on the page. When one that isn't active is selected, it updates the same video embed to change the video stream rather than destroying and creating a new node. |
In case anyone needs to know this, as a work around, you can remove the lite-youtube element and create another one in its place with the new videoid to get this to work. I tried updating the attr using setAttribute and then using the attributeChangedCallback in the class, but couldnt get it to work. But the above work around got me where I needed to be. |
Yeah I prefer you just make a new one, like what @RentecErich suggests. Early on we had a version which reacted to changing attributes, but it gets complicated. For now, this is out of scope for this project. |
Can I change the video id and make it play the new video after rendered?
The text was updated successfully, but these errors were encountered: