How can a web page play mp3 on iPhone/iPad - iphone

As far as O know, web pages play mp3 sounds by embedding invisible Flash players. Since Flash is not available on mobile webkit (iphone/ipad), how is it possible to play mp3 on this platform?

HTML5 supports these 2 tags (audio / video) which Safari supports:
In your case, you can use the audio tag.
<audio src="horse.ogg" controls="controls">
your browser doesn't support HTML5 audio
</audio>
The only catch is getting the right format for your media. :-)
Safari supports MP3 for audio, and MPEG 4 for video... Firefox supports OGG for audio/video, (I believe Opera does too), and chrome supports both.

More information about the supported file formats in HTML5 are here:
http://www.html5laboratory.com/playing-with-audio-files.php
That links to a really useful page allowing you to test the format support on your particular browser:
http://www.jplayer.org/HTML5.Audio.Support/

Related

How to encode video for Mobile Safari

I've been trying to encode a video trailer for mobile Safari playback (iPhone). Using Handbrake for Windows, I selected the source .mov file and chose the iPhone 4 preset. I then checked off the Web optimized option and started the process.
The resulting video did not play on my iPhone's Safari browser, however.
http://mobilevideo.jt.citeeze.com/static/trailer.m4v
If anyone has had success encoding mobile safari video with ffmpeg, could you provide the exact parameters?
Thanks!

Can't show .mov file on html5 video tag on iPhone

I tried different ways to show a .mov video ("ISO Media, Apple QuickTime movie" on linux) in HTML5 page with Iphone, but it isn't working.
My code is:
<video width="320" height="240">
<source src="test.mov">
</video>
With all desktop browser (chrome, firefox....) I can show the video.
Any Idea?
Thanks in advance.
Instead of using <source> tag use <src> attribute of <video> as below and you will see the action.
<video width="320" height="240" src="test.mov"></video>
As per HTML5 standards the only videos that are trully supported cross browser are MP4, ogg, and WebM. All other video files are not guaranteed to work with the standard html5 video player.
You can read more about it at this website.
http://www.w3schools.com/html/html5_video.asp
Alternatevily you can look for other video players that can help you make this for you.
Hope this helps.
The .MOV media type (Quicktime movies) is not supported in HTML5 browsers using the video element at this time. I recommend you encode those to MP4 (MPEG4).
But you can try this HTML below. The new video HTML5 element will not work as it supports limited media types (MP4, OGG, or WEBM). Using the older HTML embed or object elements forces the browser to use a plugin to support the video, if one exists. If your Quicktime movie plays, it will depend on how Apple and their Safari browser manage the plugin or player for this media type:
<embed id="embed1" src="test.mov" type="video/quicktime" style="width:320px;height:240px;">
<noembed>Your browser does not support this media object or the embed element.</noembed>
</embed>

HTML5 video player on iPad

Does the HTML5 video player on the iPad Safari have the capability to play equivalent Flash content ?
Since the iPad does not have Flash support, is there any way by which the same content can be converted into an HTML5 format (something which can be played on the iPad) ? If yes, does HTML5 support creation of highly complex Flash like content ?
I see this as two questions:
Since the iPad does not have Flash support, is there any way by which the same content can be converted into an HTML5 format (something which can be played on the iPad) ?
By the same token that you can take a video and convert it to .flv format, you can (and will need to) convert the video to mp4/m4v/h.264 codec format. A tutorial for converting a video to h.264 with Handbrake is found here: http://www.simplewebtv.com/en_tutorials.html?doc=video_handbrake
Please note that your server may need to have the filetype identified to properly serve video. A quick description of adding Mime types to Apache is found here: http://bignosebird.com/apache/a1.shtml
If yes, does HTML5 support creation of highly complex Flash like content ?
Yes, you can do much of what can be done with Flash with HTML5. To see great examples of all the things currently being done with HTML5 (using mostly <Canvas>), see:
http://www.html5rocks.com/en/tutorials/#canvas
http://aerotwist.com/lab/
http://www.canvasdemos.com/
This is a pretty good article on the topic as far as video is concerned: http://diveintohtml5.ep.io/video.html
If you are looking for a solution for interactive content have a look at http://swiffy.googlelabs.com/
Flash plays MP4 video files.
HTML5 video can also play MP4 video files (except on Firefox which requires WebM or Ogg).
So basically the answer is: Yes.

Voice Recording/Playback on Web for mobile(Android, iOS, BB)

I am working on a website that works across all mobile browsers specifically Android, iOS and BB. I have used the experimental jQuery mobile for the consistent look and feel. One of the pages require audio to be recorded and played back for this I did some research and found that HTML5 has support for this but still part of the spec so it may not available on these browsers yet, so I was wondering if there is any workaround for this. I atleast know of one such application that captures audio and its Google Voice for iPhone and I read somewhere that they use HTML5 so does that mean safari has support for HTML5 audio capture? Please suggest.
For audio playback, you can use this test page on all of your supported platforms and browsers. It should confirm which HTML5 audio playback constructs will work:
http://www.jplayer.org/HTML5.Audio.Support/
It sounds like there are issues with even getting playback to work on Android, see here for info:
http://textopiablog.wordpress.com/2010/06/25/browser-support-for-html5-audio/
I haven't seen anything about current browser support for audio recording through HTML5. You could try Java or Flash, but Java requires the user to have it installed (and accept suitable permissions), and Flash requires you to set up a server for the data to be sent to (e.g. Red5)...and remember that Flash does not work on iOS.

Is it possible to play audio with ipod webpages?

I would like to have a page and either use m4a or ogg (other formats are ok but these are my preference) on my webpage. Does the ipod touch or iphone support webpages with audio? If so, is it HTML5 and what audio formats? (if html5 i'll assume i can use the audio object in javascript and not be forced to use the audio tag).
For sure, you'll be able to instantiate a QuickTime instance to do your bidding. Can't comment on HTML5 support.