Apple has confirmed the iPhone will support YouTube when it ships on 29 June, and today introduced YouTube support for the Apple TV.

iPhone users will be able to wirelessly stream YouTube content to their device over WiFi or EDGE networks using an Apple-designed application.

YouTube videos will be encoded to stream and play on iPhone's 3.5-inch display.

Apple also announced that YouTube is now live on Apple TV, and has released a free software update for that device which adds the feature to Apple TV's existing feature set.

Apple TV owners will be able to navigate through YouTube's video browsing categories or search for specific videos. YouTube members can also log-in to their YouTube accounts on Apple TV to view and save their favourite videos.

"iPhone delivers the best YouTube mobile experience by far," said Steve Jobs, Apple's CEO. "Now users can enjoy YouTube wherever they are - on their iPhone, on their Mac or on a widescreen TV in their living room with Apple TV."

To achieve higher video quality and longer battery life on mobile devices, YouTube has begun encoding its videos into the advanced H.264 format, and iPhone will be the first mobile device to use the H.264-encoded videos.

In excess of 10,000 videos will be available initially, and YouTube will be adding more each week until its full catalogue of videos is available in the format by autumn.

iPhone will include the built-in Apple-designed YouTube application when it is available in the US on 29 June, in a 4GB model for $499 and an 8GB model for $599. iPhone will be sold in the US through Apple's retail and online stores, and through AT&T's retail stores.

UPDATE: Apple has posted videos on its website showing YouTube in action on the iPhone.