PHP code example of thelia / video-manager
1. Go to this page and download the library: Download thelia/video-manager library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thelia / video-manager example snippets
helia\VideoManager\VideoManager;
$resolver = new VideoManager();
$videoUrl = $resolver->resolve("https://www.youtube.com/watch?v=7GiOIRc-8Q0");
if (null !== $videoUrl) {
echo $videoUrl->getVideoPlayerWidget() . "\n";
}
$videoUrl = $resolver->resolve("http://www.dailymotion.com/video/x25cki_hello_world");
if (null !== $videoUrl) {
echo $videoUrl->getVideoPlayerWidget() . "\n";
}
$videoUrl = $resolver->resolve("http://vimeo.com/115794083");
if (null !== $videoUrl) {
echo $videoUrl->getVideoPlayerWidget() . "\n";
}