key: ib-youtube
name: YouTube
category: $string.ibvgdrive_category
icon: fa fa-youtube
instructions: $string.ibyoutube_instructions
template: |
  <div class="twh-video-container" {{#maxWidth}}style="max-width:{{maxWidth}}px"{{/maxWidth}}>
    <div class="twh-videoWrapper">
      <iframe src="https://www.youtube.com/embed/{{youtubeId}}?enablejsapi=1&rel=0&modestbranding=1&showinfo=0&iv_load_policy=3&start={{startSeconds}}{{#endSeconds}}&end={{endSeconds}}{{/endSeconds}}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
    </div>
    <div class="twh-caption">
      <span class="twh-caption-counter">$string.ibvgdrive_category</span><span class="twh-caption-title">: {{title}}</span>
    </div>
  </div>
  <p><br></p>
selectors: div.twh-video-container
parameters:
  - name: youtubeId
    value: ypR0y7GVMAQ
    title: $string.ibvimeo_vimeoid
    tip: $string.ibyoutube_ytid_tip
    transform: ytId
  - name: maxWidth
    value: 500
    title: $string.ibfragment_maxwidth
    min: 100
  - name: title
    value: $string.ibvgdrive_title_value
    title: $string.ibtime_title
    type: textfield
  - name: startSeconds
    value: 0
    title: $string.ibvimeo_startsec
    min: 0
  - name: endSeconds
    value: 0
    title: $string.ibyoutube_endsec
    min: 0
    tip: $string.ibyoutube_endsec_tip
contextmenu:
  - actions: cut printable
scope: ^page-mod-(book|page|assign|quizz)-
author: Josep Mulet Pol <pep.mulet@gmail.com>
version: 2.0.1
