GoogleWebComponents / google-youtube

YouTube video playback web component
https://elements.polymer-project.org/elements/google-youtube
Other
131 stars 58 forks source link

typo in docs code sample? #53

Closed kaycebasques closed 8 years ago

kaycebasques commented 8 years ago
<google-youtube
  video-id="..."
  height="270px"
  width="480px"
  rel="0"
  start="5"
  autoplay="1">
</google-youtube>

Is that supposed to be state="5"?

jeffposnick commented 8 years ago

Nope, it was just showing off how you can start playback 5 seconds into the video.

Back when I first worked on <google-youtube>, I made the decision to support all of the same parameters that the YouTube Player supports by allowing arbitrary attributes on the element, which would then get passed through to the underlying YouTube embed. start is one such parameter. The benefit is that if the underlying YouTube embed changes its list of supported parameters, we don't need to update <google-youtube> in order to support it. The downside is that there are a whole bunch of important parameters that you would never learn about from reading the <google-youtube> docs; you need to read the YouTube embed docs as well.

See also https://github.com/GoogleWebComponents/google-youtube/issues/26 which covers the same sort of thing. I'll leave that issue open and close this one.