visionappscz / video-id-extractor
Extract video ID from the link. Supports youtube, facebook, vimeo
Installs: 5 294
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Open Issues: 1
Requires
- php: >=5.6.0
Requires (Dev)
This package is not auto-updated.
Last update: 2025-01-09 12:00:11 UTC
README
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.)
}