google-youtube
google-youtube copied to clipboard
Changing the video shows the thumbnail and the video embed
I added to the (stripped down) demo a button which allows changing the video:
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../google-youtube.html">
<dom-module id="demo-element">
<template id="page-template">
<google-youtube id="custom"
video-id="yRbOSdAe_JU"
thumbnail="//www.polymer-project.org/images/logos/p-logo.svg">
</google-youtube>
<button on-tap='changeVideo'>Change video</button>
</template>
</dom-module>
<script>
Polymer({
is: 'demo-element',
changeVideo: function(ev) {
this.$.custom.videoId = '0GxteaIaj2Q';
this.$.custom.thumbnail = 'http://i.ytimg.com/vi/0GxteaIaj2Q/hqdefault.jpg';
}
});
</script>
Initially, the user sees the first thumbnail:

Clicking on the thumbnail starts the correct video:

After clicking the button to change the video, the new thumbnail is shown but the video embed is still visible:

I would expect to see only the new thumbnail. I would expect that the video embed is no longer in the DOM.
There's a bug in the demo, with videoid being used incorrectly when videoId should be used: https://github.com/GoogleWebComponents/google-youtube/pull/47
I see that you recently edited this issue—in the initial version, were you using videoid or videoId? Does using videoId fix things?
@jeffposnick, you are right: It was initially wrong but I corrected the snippet and the screenshots in the ticket. Problem is still there doe.
I created a Pull Request that fixes this issue: https://github.com/GoogleWebComponents/google-youtube/pull/48
Is there any update on this?