Embed video for play on iPhone? - 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"/>

<embed> is old school
use HTML5's <video>
iPhone supports it
<video width="199" height="159" src="http://www.example.com/mymovie.m4v" />

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

Related

how to play html5 video embedded in webpage on an iPhone?

(sorry for the big images not sure how to resize in this markdown deriv)
I have some video in a webpage, using html5 video tag.
On android, the video will remain inline on the page, allowing me to have other content around it such as subtitles in the HTML.
But on the iPhone when you hit play the video jumps out full-screen, destroying any other features.
Is there any way to prevent this take-over?
On Android, or normal web, we don't have this problem.
FYI tags using are (jade)
video(width="100%" controls="controls" autoplay="true" id='videoPlayer' class='video-player')
source(src="#{videoUrl}" type="video/mp4")
Before play
After click to play
While not originally possible in Safari on iOS using the native HTML <video> tag, Apple finally added support for this a while back by adding support for specifying a playsinline attribute on video elements.
e.g. <video … playsinline />
I appreciate this question is old, but someone had down voted it and it was unanswered.

Run 3d video on unity3d

One of my client want to run 3d video on Unity3d, I have two question
What is format of 3d videos.
Is this possible that we can run 3d video on iPhone and Android as well if it supported?
Thanks in advance.
If you meant playing a video on a texture in a 3D scene, then Unity3D as a MovieTexture class you can use. Sadly, it requires a Pro license and doesn't work on iOs or Android :(
add this code where you want to play a vedio:
Handheld.PlayFullScreenMovie("MovieFileName.mp4",Color.black,FullScreenMovieControlMode.CancelOnInput,FullScreenMovieScalingMode.AspectFit);
then put your movie file in Assets/StreamingAssets, movie file means:
.mov, .mp4, .mpv, and .3gp and using one of the following compression standards:
H.264 Baseline Profile Level 3.0 video, up to 640 x 480 at 30 fps. Note that B frames are not supported in the Baseline profile. MPEG-4 Part 2 video (Simple Profile).
details in: http://docs.unity3d.com/Documentation/ScriptReference/Handheld.PlayFullScreenMovie.html

html5 video wont play on iPad - plays on iPhone

I have a m4v video that is able to play using html5 video tag on the iPhone - but it wont play on the iPad using html5. If i go directly to the video file from the iPad it plays fine- But if I use the html5 video tag to link to it the play button wont show. Im testing using an iPad 1 and iPhone 4 - both running iOS 5. Does anyone have an idea why it wont play on the iPad?
Html5 video page - Video URL
Hey this probably won't help much for your situation but i found that with video streaming through a webview, it won't let you play video's past a certain file size.

iPhone SDK - Play Audio/Video through UIWebView

I want to know if I could play a mp3 file or mp4 (video) file through an UIWebView by loading a simple url request. I have already tried sending the UIWebView to a video link (e.g. http://google.com/blah.mp4) but it will flash a quick QuickTime logo and show a black screen. However in MobileSafari it streams fine. Is there anyway to play a media file through an UIWebView??!
Thanks,
Kevin
Use the HTML5 <audio> tag.
Linda

<video> works in the iPad, but not on the iPhone

I'm trying to embed an M4V video, it works on the iPad but not the iPhone.
On the iPhone I get a play button crossed over (the can't play button).
I am testing this on iPhone 3.0 (Original iPhone).
Any help/advice would be great.
My code:
<video id="sr-video" poster='' controls="">
<source src='http://blip.tv/file/get/FILE.m4v' type="video/m4v" />
</video>
Update:
I've added a mime type like so:
video/mp4 mp4 m4v mp4v mpg4
Did not help...
What are the video/audio codecs and resolution of the video you are trying to play? I would check that the format of the video is supported by the original iPhone, see:
http://reviews.cnet.com/8301-19512_7-10114945-233.html
For instance, unlike the iPad and the latest iPhone, previous iPhone models were not capable of playing 720p video.