Skip to content
A Library for Video Preview from YouTube, Vimeo etc.
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.npmrc
.travis.yml
README.md Add a Bitdeli badge to README
bower.json
composer.json
main.js
package.json
videopreview-cli.js
videopreview.js

README.md

videopreview.js

Bower version Build Status Github Release Github Tag Downloads Version

A Library for Video Preview from YouTube, Vimeo etc.

This repo is also for distribution on bower. The source for this module is in the main VideoPreview repo.

Requirements

Installation

Install with bower:

bower install videopreview

Add a <script> to your index.html:

<script src="/bower_components/videopreview/videopreview.js"></script>

Documentation

Get YouTube thumbnails from url

VideoPreview.getYoutubeThumbnail(url);

Get Vimeo thumbnails from url

VideoPreview.getVimeoThumbnail(url);

Get Thumbnails(YouTube,Vimeo) from url

VideoPreview.getThumbnailUrl(url);

Get Embedable video(YouTube,Vimeo) link from url

VideoPreview.getEmbedLink(url);

Example

VideoPreview.getThumbnailUrl(url).then(function(data) {
  $scope.videoThumbnailLink = data;
});

Bitdeli Badge

Something went wrong with that request. Please try again.