About 10,000 YouTube videos will be available for the iPhone's launch, according to Apple's release. YouTube, a subsidiary of Google Inc., will be recoding the rest of its videos into the H.264 format used by the iPhone by fall.
The iPhone will be the first cell phone to use H.264, Apple said.
"IPhone delivers the best YouTube mobile experience by far," Apple Chief Executive Steve Jobs said in the statement.
The iPhone will use a relatively slow cellular data network provided by AT&T Inc., and streaming video is likely to tax it. However, the iPhone will also be equipped with Wi-Fi, providing faster speeds in "hotspots."
The iPhone, probably the most hyped consumer gadget this year, marries a cellular phone with the music- and video-playing capabilities of Apple's hit iPod and features a 3.5-inch touch-sensitive screen. Two models, for $499 and $599, will go on sale in the U.S. on Friday, June 29.
Apple also said YouTube videos are now available on its Apple TV device, a small computer that connects to a TV. Until now, the Apple TV has mainly been able to show videos from the user's iTunes library, and some movie trailers from Apple's site. Apple had previously announced that it was working on adding the feature.