video-source-url

Get video source from Youtube or Vimeo URL.

Usage no npm install needed!

<script type="module">
  import videoSourceUrl from 'https://cdn.skypack.dev/video-source-url';
</script>

README

Video Source URL Build Status

Get video source from Youtube or Vimeo URL.

video-source-url

Install

$ npm install video-source-url --save-dev

Usage

For now, Youtube and Vimeo urls are supported.

var videoSourceUrl = require('video-source-url');
videoSourceUrl.src('https://www.youtube.com/watch?v=3cvmONlV5WU');
//  {
//    id: '3cvmONlV5WU',
//    type: 'youtube',
//    src: 'https://www.youtube.com/embed/3cvmONlV5WU'
//  }

Contributions

Pull requests and issues are be welcome.

License

MIT license

© 2015 José Luis Quintana