Ask HN: Can the iPhone play videos on websites?
I know that the iPhone does not support flash but can it play videos using other technologies (ex: the HTML 5 video tag)?
14 comments
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.
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.
The iPhone can play back h.263 and h.264 in 3gp, mp4 and mov containers. http://developer.apple.com/webapps/designingcontent.php
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
http://www.apertureprofessional.com/showthread.php?t=2957
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.
step 1: Implement a flash player in javascript
step 2: Dodge Steve Jobs personal assassination squad
step 3: Profit.
Has anyone ever profited from pure client-side js code? I am not even sure it is possible.
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.
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.
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.
[deleted]
No.
I know of no method that works, other than YouTube videos.
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.
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.
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
[deleted]