Quick Tip – Simple HTML5 Video

HTML5 is awesome. It extends the DOM to be ready for the future once broadband is wide enough to replace your old broadcast TV in full HD.

Video is obviously the most exciting element. Now you can directly interact with the video in the DOM which can mean you can make a fully, easily to update scripted site which does not rely on plugins.

There is a few things to note about HTML5 video:

  1. There is no standard video format so you will need to encode your videos using both MP4 and OGG Theora. Google has WebM which may become the standard. Use Handbrake to encode the MP4 version and ffmpegtotheora to encode the OGG. Google this, it will take you less then 5 minutes to encode your video in the formats.
  2. You will want to use a fall-back for older browsers. I like Flowplayer which is a Flash video player
  3. Progressively enhance your site. If you want to do some cool stuff with the video ensure that you still have a working site for those using a 9 years old browser.

If we want to have a video with is 843×480 which preloads, plays once it is buffered and contains controls we will use the below

<video width="843" height="480" preload autoplay controls>
 <source src="/video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
 <source src="/video.ogv" type='video/ogg; codecs="theora, vorbis"'>
</video>

That is exactly how simple HTML5 video can be. Of course you may want to add poster or change the settings.

Since we want fallback for IE we will use Flowplayer by embedding it after the other sources. This is a cool thing about the element is that it has fallback.

<video width="843" height="480" preload autoplay controls>
 <source src="/video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
 <source src="/video.ogv" type='video/ogg; codecs="theora, vorbis"'>
 
</video>

If you want a real in depth look at HTML5 video I recommend you read:

Advertisements

iPad Sexy Video

While the iPad has it flaws, it has the best marketing video. There is a lot of potential with build apps. I think I might buy one for the tax offset and develop some new apps for it.

Error
This video doesn’t exist

Does the iPad = biggest disappointment ever?

So the iPad looks to be the biggest disappointment, ever. I didn’t know what to expect, though with all the hype I was expecting a little more. I was thinking something si-fi where you could do so many cool screen flicking, resizing and all that sort of stuff. Something revolutionary was the expectation. What we got was a larger iPhone without phone.
It is basically an 10″ iPhone. It is meant to be the half way between the iPhone and MacBook but I think it is more towards the iPhone end of the spectrum. Apple is marketing at the crowd who own both a smart-phone (hopefully the iPhone) and a laptop (hopefully a MacBook). Hopefully it will be powerful enough and adequate to haul around all day instead of your laptop.
There doesn’t appear to be multitasking, which is a big annoyance with the iPhone. This would of made it more on the PC side of things.
Continue reading

Connecting cPanel to GMail

GMail kicks the cPanel mail apps butt. So I always recommend that clients to use the free Google Apps to manage their email. This is a big bonus for clients as they get to use the simple GMail interface with their own domain.

The big benefits to using GMail is the:

  • 7GB storage per a user,
  • ability to access multiple email accounts from one GMail,
  • easy to configure your iPhone to access it,
  • looks really nice,
  • plays nice with mail clients such as Apple Mail, and
  • it is a lot easier for users to use. Continue reading

Outputing PHP to Excel

A few people have recently asked me about outputting data to Excel. This is a very simple thing to do from PHP with two lines of code.

[cc lang=”PHP”]header(“Content-type: application/vnd.ms-excel”);
header(“Content-Disposition: attachment; filename=webbased.xls”);[/cc]
Continue reading

Connecting your plugin to the WordPress Database

Connecting to the WordPress database is very simple. The $wpdb variable connects to the class which controls the access to the database meaning your plugin can easily use the database without having to write a connection script. The $wpdb class also contains routines which will make your life easier. This post details the $wpdb variable and the basic routines it supports. It is intended to help those building a plugin which needs a database and does not describe how to build a plugin.

Audience: WordPress Plugin Developers
Level: Beginner – Intermediate
Assumed Knowledge: You know how to build a WordPress Plugin and how to write queries in MySQL.

In this tutorial we are going to build a simple plugin which when a user visits a page in your WordPress environment their IP, the page visited, and time is stored in the database which the results will be shown in the admin section of WordPress. This plugin is going to be very basic yet you can easily imagine just how much analytics you could possibly do with the data captured.
Continue reading

My Top 10 WordPress Plug-ins

WordPress is a popular blog engine which is becoming more and more a CMS. What makes WordPress a lot more popular than the rivals is the plug-ins created by the community that extends base WordPress to unlimited capabilities. Starting a site with WordPress allows designers and developers skip a lot of the non-core development process and focus on the core functionality of the site. Below is a list of my top 10 plug-in.
Continue reading