Skip to content

Generate video embed code for services like YouTube, Vimeo and Vevo

License

Notifications You must be signed in to change notification settings

jellekralt/video-embed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/

About

Generate video embed code for services like YouTube, Vimeo and Vevo

Resources

License

Stars

Watchers

Forks

Packages

No packages published