<template>
  <div class="video-responsive">
    <iframe
      width="100%"
      height="400"
      :src="url"
      frameborder="0"
      allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
      allowfullscreen
    />
  </div>
</template>

<script>
// to use this bloc pass <YouTube id="youtube-video-code" /> ex. <YouTube id="tKjZuykKY1I" />
export default {
  props: {
    id: String,
  },

  data() {
    console.log(this._props.id);
    return {
      url: `https://www.youtube.com/embed/${this._props.id}`,
    };
  },
};
</script>

<style></style>
