Pomoć oko embed mp4 videa

Dakle imam jednu skriptu gdje je moguće samo dodati youtube,vine,vimeo video pa mi treba pomoć kako da mali dio tog editijem i da mogu i videje koje upladam na site.com/video/primjer.mp4 da embedujem.
Našao sam ovaj dio koda i mislim da je s time povezano samo mi treba vaš pomoć kako da to dodam da i bez tih mogu uplodati video.

function get_video_code($url){
		$type=getdomain($url);
		if($type=="youtube.com"){
			$queryString = parse_url($url, PHP_URL_QUERY);
			parse_str($queryString, $params);
			$embed_code='iframe class="youtube-player" type="text/html" width="100%" height="480" src="http://www.youtube.com/embed/' . trim($params['v']) . '" frameborder="0" allowFullScreen></iframe>';
		}
		else if($type=="vimeo.com"){
			preg_match('/(\d+)/', $url, $output);
			$id = $output[0];
			$embed_code = 'iframe src="http://player.vimeo.com/video/' . trim($id) . '" width="640" height="480" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
		}
		else if($type=="vine.co"){
			$id = preg_replace('/^.*\//','',$url);
			$embed_code='iframe class="vine-embed" src="https://vine.co/v/' . trim($id) . '/embed/simple?audio=1" width="100%" height="480" frameborder="0"></iframe><script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script>';
		}

ispred inframe bude < samo sam maknuo jer se bez toga nije vidio cijeli kod.