Skip to content

Extracts video IDs from links to videos hosted on YouTube, Facebook and Vimeo.

License

Notifications You must be signed in to change notification settings

visionappscz/video-id-extractor

Repository files navigation

Video ID Extractor

Travis build status

This library extracts video IDs from links to hosted videos.

The supported services are:

Getting Started

Installing

Install with composer

require visionappscz/video-id-extractor

Usage example

use VideoIdExtractor\Extractor\VideoIdExtractException;
use VideoIdExtractor\Extractor\YoutubeVideoIdExtractor;  
  
...
  
$extractor = new YoutubeVideoIdExtractor();
try {
    $videoId = $extractor->extract('http://www.youtube.com/watch?v=uWhV5wSyxTI');
} catch (VideoIdExtractException $e) {
    die('The supplied link is not valid.)
}

About

Extracts video IDs from links to videos hosted on YouTube, Facebook and Vimeo.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages