iPhone SDK - Play Audio/Video through UIWebView - iphone

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

Related

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.

how to display youtube video and mp4 file in same project using webview iphone?

how to display youtube video and mp4 file in same project using uiwebview iphone?
Perhaps these will help:
http://apiblog.youtube.com/2009/02/youtube-apis-iphone-cool-mobile-apps.html
http://learningtheworld.eu/2009/youtube-embed/
http://iphoneincubator.com/blog/audio-video/how-to-play-youtube-videos-within-an-application

video playing from pdf file in iphone or ipad

I am developing an application, which is reads a PDF file and displays it in webview now we have videos embedded within pdf, how to play those videos within webview like html5 did.
thanks in advance.
Webview will not detect and play the videos embedded inside the pdf. You have to parse the pdf and get the file stream and play it using MPMoviePlayerController.

How to read flash video in Iphone app

Here is my problem, I would like to play flash video in my iphone app.
I'm parsing XML file and I get flash video url like this : http://www.dailymotion.com/video/xg8evw_electric-pursuit-english-version_auto
How can I do?
Thanks.
It looks like your video on the page is encoded as an H.264 MP4, so you can pull it in directly - http://vid.akm.dailymotion.com/video/693/662/27266396_mp4_h264_aac_hq_2.mp4?aksessionid=-1459231571_739074&akauth=1295628091_ff040ccd7dbe1834e6127da452a4069d (that's your video path)
I found it!
Dailymotion added a new feature which generates an iframe compatible with Ipad, Iphone and Android.
Go on video page,
Click on Embed button (under video)
Check the checkbox Enable iframe player compatible iPhone, iPad, Android ... (Beta)

How to play video in the iPhone without using MPMoviePlayerController?

Is this possible to play any video file without using of MPMoviePlayerController in iPhone?
Yes. You can also use a UIWebView. See this answer.
You can use a web view but you can play only those videos present in the bundle, you cannot play any format in iPhone as some of the formats are not supported.
See this link