Skip to content
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

Changing the video shows the thumbnail and the video embed #46

Open
ronnyroeller opened this issue Oct 26, 2015 · 4 comments
Open

Changing the video shows the thumbnail and the video embed #46

ronnyroeller opened this issue Oct 26, 2015 · 4 comments

Comments

@ronnyroeller
Copy link

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:
youtube-bug-1

Clicking on the thumbnail starts the correct video:
youtube-bug-2

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

I would expect to see only the new thumbnail. I would expect that the video embed is no longer in the DOM.

@ronnyroeller ronnyroeller changed the title Changing the video shows the new thumbnail and the old video embed Changing the video shows the thumbnail and the video embed Oct 26, 2015
@jeffposnick
Copy link
Contributor

There's a bug in the demo, with videoid being used incorrectly when videoId should be used: #47

I see that you recently edited this issue—in the initial version, were you using videoid or videoId? Does using videoId fix things?

@ronnyroeller
Copy link
Author

@jeffposnick, you are right: It was initially wrong but I corrected the snippet and the screenshots in the ticket. Problem is still there doe.

@ronnyroeller
Copy link
Author

I created a Pull Request that fixes this issue: #48

@kovacicmilan
Copy link

Is there any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants