I was wondering how the embed a media file into HTML for the mobile Safari browser on Apple's Iphone or Ipod Touch. Therefore, I looked up how others are doing it and what's in the documentation Apple:
- BBC has made a portal to its podcasts : http://www.bbc.co.uk/radio
/podcasts/directory/ip/or you can just go to bbc.co.uk/podcasts.
The code used to embed the mp3 podcasts is:
More info on BBC podcast portal.
- Also Apple makes their trailers available in an Ipod Touch / Iphone friendly way. The URL is http://www.apple.com/trailers/iphone/
Here's the HTML code that Apple uses to embed the Beowulf movie:
<embed src="http://movies.apple.com/trailers/iphone/images/greenband_320x133.png" href="http://movies.apple.com/movies/paramount/beowulf/beowulf-fte_i320.m4v"
target="myself" width="320" height="133"
scale="1" cache="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">
Ars Technica has some screenshots of Apple trailers on the Iphone.
- The code proposed by Apple looks like this:
QT_WriteOBJECT_XHTML('http://d2.mikseri.net/m/30a/30007249206/Frozen%20Silence%20-%20Cherish.mp3', '32', '16', '',
The URL is to a piece of music of the album "Frozen Silence" by Matti Paalanen.
- Also the indie site http://ourstage.com has Iphone specific pages according to Techcrunch. But when surfing to that page on my Ipod Touch i get no specific content.
To get those HTML codes, go to about:config in Firefox and set the value of general.useragent.extra.firefox from something like 'Firefox/18.104.22.168' to 'Useragent "Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML,like Gecko) Version/3.0 Mobile/3A100a Safari/419.3' and then surf to the URL for ipod touch or iphone and inspect the page source.