Hello Everybody,
I have a wordpress plugin there is a video embed option, but I would like to change it to embed my vids (mp4 file format)
For example my domain is www.xyz.com and there is a video file, its path is (www.xyz.com/asdf.mp4)
How can I embed this with that code?
[code]if(trim($embeded_code) == ‘’)
{
if(preg_match('/youtube/', $video_url))
{
if(preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $video_url, $matches))
{
$output = '<iframe title="YouTube video player" class="youtube-player" type="text/html" width="'.$width.'" height="'.$height.'" src="http://www.youtube.com/embed/'.$matches[1].'" frameborder="0" allowFullScreen></iframe>';
} else
{
$output = __('Sorry that seems to be an invalid <strong>YouTube</strong> URL. Please check it again.', 'framework');
}
}
elseif(preg_match('/vimeo/', $video_url))
{
if(preg_match('~^http://(?:www\.)?vimeo\.com/(?:clip:)?(\d+)~', $video_url, $matches))
{
$output = '<iframe src="http://player.vimeo.com/video/'.$matches[1].'" width="'.$width.'" height="'.$height.'" frameborder="0"></iframe>';
}
else
{
$output = __('Sorry that seems to be an invalid <strong>Vimeo</strong> URL. Please check it again. Make sure there is a string of numbers at the end.', 'framework');
}
}
else
{
$output = __('Sorry that is an invalid YouTube or Vimeo URL.', 'framework');
}
echo $output;[/code]