Embed video for playing on iPhone?

Does anyone have experience embedding .m4v movie files in web pages for playback on iPhone? I'm trying to create a site optimized for the iPhone, and it includes a video, but I just can’t get this video to play - all I get is a gray arrow to play with a line through it.

The markup I'm trying to use to implement it is this:

<embed width="199" height="159" type="video/x-m4v" href="http://www.samplesite.com/motion/mymovie.m4v" src="http://www.samplesite.com/motion/mymovie.jpg"/> 
+6
iphone video embed
source share
2 answers

<embed> - old school

use HTML5 < video >

iPhone supports it

 <video width="199" height="159" src="http://www.example.com/mymovie.m4v" /> 
+13
source share

You have a gray arrow to play with a line through it, this probably means that the MPMoviePlayerController class cannot play a movie.
This class only supports H.264 Baseline Profile Level 3.0 (up to 640 x 480 at 30 frames per second) and MPEG-4 Part 2 video (simple profile), and it is possible that your video file does not meet this requirement.

NTN

+1
source share

All Articles