Well, you can’t, really, but you can fake it real good. Youtube works great, but I really like Vimeo which sadly is Flash-based and does not work on the iPhone. But you can instruct your WordPress blog post to swap out the Vimeo video for an MP4 version of the video that does work on the iPhone.
Here’s how you do it:
1. Encode your video and output an MP4 iPhone compatible video. Upload it to where you host your files. I use Quicktime Pro and the default settings.
2. Download the EXEC-PHP WordPress plugin. This will let your posts interpret PHP code without any hassle.
3. Add a new post. Click the HTML tab, and paste this code in, changing the values accordingly.
<?php
if(strstr($_SERVER['HTTP_USER_AGENT'],’iPhone’) || strstr($_SERVER['HTTP_USER_AGENT'],’iPod’)) {
print <<<END
<embed src=”http://pathtovideo.m4v” width=”XXX” height=”XXX” href=”http://pathtovideo.m4v”>
END;
}
else {
print <<<END
*****VIDEO EMBED CODE*****
END;
}
?>


Leave a Comment