jQuery Plugin To Play Vine Videos/Audios In A Loop - vineVideoPlayer

File Size: 1.59 KB
Views Total: 1733
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
jQuery Plugin To Play Vine Videos/Audios In A Loop - vineVideoPlayer

vineVideoPlayer is a jQuery script to create an Vine video player on the webpage to play a list of Vine videos or audios in a loop.

How to use it:

1. Include the jQuery javascript library in the Html page.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

2. Insert an Vine video player into your webpage. Replace the url in the 'src' tag below to replace the starting vid.

<div id="vine-content" class="frame"> 
          frameborder="0"> </iframe>

3. Create a playlist using javascript object array and enable the plugin.

<script type='text/javascript'>
$(function() {
var videoUrls = [
"https://vine.co/v/MrZH1BZ3WQw/embed", // this is the same as the start vid, for when it loops back around
var idx = 1;
var $iframe = $('iframe');
var hangTime = 6000; // this is the loop time (in MS)

setInterval(function() {
var newVid = videoUrls[idx]
$iframe.attr('src', newVid + '/simple'); // for videos
// $iframe.attr('src', newVid + '/simple?audio=1'); for audios
idx += 1;
idx = idx % videoUrls.length;
}, hangTime); 

This awesome jQuery plugin is developed by drwrchrds. For more Advanced Usages, please check the demo page or visit the official website.