Skip to content
A Library for Video Preview from YouTube, Vimeo etc.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.npmrc
.travis.yml
README.md
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

You can’t perform that action at this time.