<template>
  <iframe
    :src="`https://player.vimeo.com/video/${videoId}`"
    class="vimeo-embed"
    frameborder="0"
    webkitallowfullscreen
    mozallowfullscreen
    allowfullscreen/>
</template>

<script>
  import {getVideoId} from '@/helpers/video';

  export default {
    props: ['url'],

    computed: {
      videoId() {
        return getVideoId(this.url);
      }
    }
  };
</script>

<style scoped lang="scss">
  .vimeo-embed {
    width: 100%;
    height: 350px;
  }
</style>
