Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed video for play on iPhone?

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

The markup I'm trying to use for embedding 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"/>
like image 604
n00b0101 Avatar asked Jan 20 '10 01:01

n00b0101


People also ask

How do I make videos play on home screen iOS?

Picture in Picture for iPhone To do Picture in Picture, first go to a video app like the Apple TV or the Twitch app, a livestreaming platform. Play a video. Swipe up to go home, or press the home button on non-Face ID iPhones. The video will start playing in a separate floating window, on top of your home screen.

How do I play a video in a text message on my iPhone?

Messages Full Screen Videos When you want to play the video, tap slightly off-center on the video thumbnail. The play icon is the center. Tap anywhere but the play icon. If you tap the play icon, it will play the video inline.


2 Answers

<embed> is old school

use HTML5's <video>

iPhone supports it

<video width="199" height="159" src="http://www.example.com/mymovie.m4v" />
like image 77
Anurag Avatar answered Sep 24 '22 15:09

Anurag


You got the gray play arrow with a line through it, it probably means that the MPMoviePlayerController class can't play the movie.
This class only supports H.264 Baseline Profile Level 3.0 video (up to 640 x 480 at 30 fps) and MPEG-4 Part 2 video (Simple Profile), and there's a possibility that your movie file doesn't match this requirement.

HTH

like image 39
tomute Avatar answered Sep 22 '22 15:09

tomute