video-embed

0.2.0 • Public • Published

video-embed Build Status

This module generates video embed code for services like YouTube, Vimeo and Vevo. In short, it converts this:

https://www.youtube.com/watch?v=oHg5SJYRHA0

To this:

<iframe src="//www.youtube.com/embed/oHg5SJYRHA0" frameborder="0" allowfullscreen></iframe>

Usage

var videoEmbed = require('video-embed');
 
var embedHTML = videoEmbed('https://www.youtube.com/watch?v=oHg5SJYRHA0');
 
console.log(embedHTML);
// <iframe src="//www.youtube.com/embed/oHg5SJYRHA0" frameborder="0" allowfullscreen></iframe> 

Video website support

The module currently supports the following video websites:

YouTube

The module supports the following YouTube link formats

Vimeo

The module supports the following Vimeo link formats

Vevo

The module supports the following Vevo link formats

Other websites

If you'd like other video websites to be supported you are more than welcome to submit a pull request or an issue requesting a site 😃

License

MIT: http://jellekralt.mit-license.org/

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.01latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.01
0.1.00

Package Sidebar

Install

npm i video-embed

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • jellekralt