Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTML
<script>
  $( document ).ready(function() {
     // Training Videos Vimeo video IDs
    var videoIDs = [303274080, 303274897, 303275744, 303276184, 303276601, 303277172, 303277831];

    // LoadTime firstbox videotemplate
    $('.videoScreen iframe').attr('src', 'https://player.vimeo.com/video/' + videoIDs[0]);

    // Show current embedded video and set timebox to active
    $('.timeBox').on('click', function() {
      var $this = $(this);
      var index = $this.index();

      $('.timeBox').removeClass('active');
      $this.addClass('active');

      $('.videoScreen iframe').attr('src', 'https://player.vimeo.com/video/' + videoIDs[index]);
    });

    // Get thumbnail images and set them in timebox elements
    $('.timeBox .thumbnail').each(function(n){
      var $this = $(this);
      $.ajax({
        method: "GET",
        url: "https://api.vimeo.com/videos/" + videoIDs[n] + '?access_token=0e76ec72e4cc1a5111ac16023a2d0456',
        success: function(datavar timeBoxTemplate = function(videoNum, videoID) {
          var imgElem = $('<imgreturn '<div class=\"video-imagetimeBox\" srcid="video_' + data["pictures"]["sizes"][3]["link_with_play_button"]videoID + '" />'); +
         imgElem.appendTo($this);         }
      });
    });

  });
</script>

'<div class=\"trainingVideosContainertitleHolder\">' +
 <div class="videosMainHolder">      <div class="timelineHolder">       '<div class=\"timelinevideoNumberHolder\">' +
        <div class="timeBox active">           '<div class=\"titleHoldervideoNumber\">' + videoNum + '</div>' +
       <div class="videoNumberHolder">               <div class="videoNumber">1<'</div>' +
           </div>             '<div class=\"videoTitle\">Login>' and+ Account Settings</div>
          "" + '</div>' +
         <div class="thumbnail"></div>         '</div>' +
        <div class="timeBox">           '<div class=\"titleHolderthumbnail\">
            <div class><img src="videoNumberHolder">
              <div class="videoNumber">2</div>
"></div>' +
           '</div>';
    };

    for (var <div class="videoTitle">Recording Setup</div>
 i=0; i<videoIDs.length; i++) {
      var timeBox </div>
          <div class="thumbnail"></div>
        </div>= timeBoxTemplate(i+1, videoIDs[i]); // To start from 1 not from 0
           <div class="timeBox">$(timeBox).appendTo('.timeline');
    }

    <div class="titleHolder">
            <div class="videoNumberHolder">
              <div class="videoNumber">3</div>
            </div> Load first video
    $('.videoScreen     <div class="videoTitle">Camera Controls</div>
          </div>
          <div class="thumbnail"></div>
 iframe').attr('src', 'https://player.vimeo.com/video/' + videoIDs[0]);

     </div>/ Get data from vimeo
     <div class="timeBox">
 $.each(videoIDs, function (i, videoID) {
      $.ajax({
 <div class="titleHolder">             <div class="videoNumberHolder">method: "GET",
              <div class="videoNumber">4</div>
            </div>
            <div class="videoTitle">Managing the Intercom Function</div>
          </div>
          <div class="thumbnail"></div>
        </div>

        <div class="timeBox">url: "https://api.vimeo.com/videos/" + videoID + '?access_token=0e76ec72e4cc1a5111ac16023a2d0456',
        success: function(data) <div class="titleHolder">{

        var timeBox   <div class="videoNumberHolder">
 $('#video_'+videoID);
        timeBox.find('.videoTitle').text(data.name);
    <div class="videoNumber">5</div>   timeBox.find('.thumbnail img').attr('src', data.pictures.sizes[3].link_with_play_button);
       </div> }
      });
    <div class="videoTitle">Annotating Videos</div>});

    $('.timeBox:first-child').addClass('active');

     </div>
          <div class="thumbnail"></div> Show current embedded video and set timebox to </div>active
         <div class="timeBox">
 $('.timeBox').on('click', function() {
      var $this <div class="titleHolder">
 $(this);
      var index    <div class="videoNumberHolder">
 $this.index();

      $('.timeBox').removeClass('active');
     <div class="videoNumber">6</div> $this.addClass('active');

      var     </div>
            <div class="videoTitle">Video Review and Video Upload</div>
          </div>
 id = $this.children('.videoID').val();
      $('.videoScreen iframe').attr('src', 'https://player.vimeo.com/video/' + videoIDs[index]);
    });

  <div class="thumbnail"></div>
        </div>

        });
</script>

<div class="timeBoxtrainingVideosContainer">
          <div class="titleHoldervideosMainHolder">
            <div class="videoNumberHoldertimelineHolder">
              <div class="videoNumbertimeline">7</div>>

           </div>
            <div class="videoTitle">User Management</div>
          </div>

         <div class="thumbnail"></div>
        </div>

      </div>
    </div>

    <div class="videoHolder">
      <div class="videoScreenHolder">

        <div class="videoScreen">
          <div<iframe stylesrc="padding:62.5% 0 0 0;position:relative;">
            <iframe src="https://player.vimeo.com/video/303274080" style="position:absolute;top:0;left:0;width:100%;height:100%; width="640" height="400" frameborder="0" webkitallowfullscreen="" mozallowfullscreen allowfullscreen></iframe>
          </div>
          <script src="https://player.vimeo.com/api/player.js"></script>="" allowfullscreen=""></iframe>
        </div>

      </div>
    </div>
   </div>
</div>