News for hackers. Stuff that matters.
Re:Ask HN: Can the iPhone play videos on websites? by DarkShikari on Tuesday November 18, 2008 @09:07PM (#369029)
The iPhone's video capability is extremely limited. I talked to someone recently who was trying to stream video to the iPhone. The main issue is that the internal video decoding API is not open, so you can't arbitrarily open it up from an iPhone application and pass in a video stream to be decoded. You can only open it on a full file.

One of the problems with this is streaming video. You can do video downloads a'la Youtube, but that's because those fit the model: they are mp4 files with a header atom at the front containing index information for the entire file. You can't do this in live streaming, for obvious reasons. The guy I had talked to basically concluded that it was impossible to view a live video stream on the iPod with an ordinary application, since Apple's API was closed and the built-in ARM CPU was an order of magnitude too slow to do the video decoding on its own with a custom decoder rather than using the built-in decoder chip.

Re:Ask HN: Can the iPhone play videos on websites? by aaroneous on Tuesday November 18, 2008 @09:27PM (#369043)
The iPhone can play back h.263 and h.264 in 3gp, mp4 and mov containers. http://developer.apple.com/webapps/designingcontent.php
Re:Ask HN: Can the iPhone play videos on websites? by jgranby on Tuesday November 18, 2008 @09:14PM (#369035)
Apart from YouTube videos, it can play some H.264 videos with its built-in Quicktime player, which can be launched automatically from Safari. This is how BBC's iPlayer (on-demand) service works with the iPhone/iTouch. I don't know too much about what types of video are allowed, but this might help:

http://www.apertureprofessional.com/showthread.php?t=2957

Re:Ask HN: Can the iPhone play videos on websites? by Anon84 on Tuesday November 18, 2008 @10:06PM (#369076)
A javascript flash player would be incredibly awesome... and tremendously difficult, I imagine.

step 1: Implement a flash player in javascript

step 2: Dodge Steve Jobs personal assassination squad

step 3: Profit.

Re:Ask HN: Can the iPhone play videos on websites? by kwamenum86 on Tuesday November 18, 2008 @10:55PM (#369107)
Has anyone ever profited from pure client-side js code? I am not even sure it is possible.
Re:Ask HN: Can the iPhone play videos on websites? by shutter on Tuesday November 18, 2008 @11:20PM (#369124)
If you license it right, anything's possible. (i.e. major corporations can't use your code illegally or they'll get caught.)

Just because the source code is publicly viewable doesn't mean anyone can take it without permission; small people will, but the companies that would pay you for such a thing can't get away with that kind of piracy.

Re:Ask HN: Can the iPhone play videos on websites? by kwamenum86 on Wednesday November 19, 2008 @12:10AM (#369162)
Yea, after I wrote that I thought of ext-js (http://extjs.com/). Good point. I don't know what kind of money they are raking in because they are a js framework but a client of mine bought a commercial license. Their framework is ROBUST.
Re:Ask HN: Can the iPhone play videos on websites? by cbarning on Tuesday November 18, 2008 @11:06PM (#369114)
Adobe has developed Flash for iPhone, they are just waiting for Apple approval.
Re:Ask HN: Can the iPhone play videos on websites? by unalone on Tuesday November 18, 2008 @11:49PM (#369146)
Yeah? And? Apple doesn't look like they'll be approving that any time soon.
Re:Ask HN: Can the iPhone play videos on websites? by Morieris on Tuesday November 18, 2008 @08:58PM (#369020)
No. I know of no method that works, other than YouTube videos.
Re:Ask HN: Can the iPhone play videos on websites? by jws on Tuesday November 18, 2008 @10:33PM (#369095)
Simply loading an mpeg or mov file works. I set content type to video/mpeg and encode in H.264. It works fine.

The HTML5 video tag is not supported, if I go to http://webkit.org/blog/140/html5-media-support/ I get the "This is fallback content..." message at the bottom of the post. The current official desktop Safari build handles the video tag, so perhaps it is coming.

Re:Ask HN: Can the iPhone play videos on websites? by kwamenum86 on Tuesday November 18, 2008 @09:03PM (#369024)
I think a may have thought of a way to make it work...will post it on HN when I am done if this thread does not produce any good answers