Version: 5.x

vm-youtube

Enables loading, playing and controlling videos from YouTube.

You don't interact with this component for passing player properties, controlling playback, listening to player events and so on, that is all done through the vime-player component.

Quirks#

  • When the player is paused, seeking and seeked are fired at the same time (in order), because there are no updates between the events from the embed.

  • Changing the controls prop forces the player to reload.

  • You cannot change playbackQuality programmatically, YouTube automatically determines the best quality to play.

  • Fullscreen changes that come from clicking the YouTube fullscreen control are not tracked on iOS, because the embed doesn't provide an API for it.

Usage#

<vm-player controls>
<vm-youtube video-id="DyTCOwB0DVw"></vm-youtube>
<!-- ... -->
</vm-player>

Properties#

PropertyDescriptionTypeDefault
cookiesWhether cookies should be enabled on the embed.booleanfalse
posterThe absolute URL of a custom poster to be used for the current video.string โˆฃ undefinedundefined
showFullscreenControlWhether the fullscreen control should be shown.booleantrue
videoId (required)The YouTube resource ID of the video to load.stringundefined

Dependencies#

Depends on#