Total Video Audio Converter Screen Shots
Home Getting Started Download Buy Now! Screen Shots Support Contact
Total Video Audio Converter

Embed Video and Audio on Website for iPhone/iPad/iPod


This article shows you how to embed video and audio on website for iPhone, iPad, and iPod without using HTML 5.

First, convert your video and audio files to iPhone/iPad/iPod compatible format.

If your video or audio file is not compatible with iPhone/iPad/iPod, you need to convert your video or audio file to the compatible format.

  • Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
  • Audio formats supported: AAC (8 to 320 Kbps), Protected AAC (from iTunes Store), HE-AAC, MP3 (8 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, 4, Audible Enhanced Audio, AAX, and AAX+), Apple Lossless, AIFF, and WAV

We recommend you a great video converter - Total Video Audio Converter, which converts more than 100 video and audio formats to iPod/iPhone/iPad compatible format, and HTML 5 formats such as OGG, H.264, and WebM.

  1. Free Download Total Video Audio Converter
  2. Install the Program by Step-by-step Instructions
  3. Launch Total Video Audio Converter
  4. Choose Video or Audio Files

  5. Click Add Files
    Click "Add Files" to choose video or audio files.

    Choose one or more video or audio files
    Choose one or more video or audio files you want to convert and then click Open.

  6. Choose Output Format

  7. to iPhone
    Click on combo-box of output format and then choose "to iPhone".
    For audio file, please choose "to MP3".

  8. Convert
    Click Convert
    Click "Convert" to convert all video or audio files in list to iPhone/iPad/iPod compatible format.

    Converting

  9. Done

Second, create web page for your video.

  1. You need a Javascript file for your video and audio. The file is free, it works great, and it makes your life easier. Right-click here and choose "Save Target As" to download the file
  2. Link the Javascript file to your page. The page might look something like this:
  3. <html>
    <head>
    <script src="AC_QuickTime.js" language="JavaScript" type="text/javascript">
    <script language="javascript">
      var ua = navigator.userAgent ;
      if (ua.indexOf("iPhone") > 0) document.location.replace("path/to/video.m4v");
    </script>
    </head>
    <body>
    <script language="javascript">
      QT_WriteOBJECT('path/to/video.m4v', 'width','height+16', '', 'autoplay', 'true');
    </script>
    </body>
    </html>

    The code is really simple. Let's review it.

    Include AC_QuickTime.js from Apple to write the object and embed tags for you.

    Read the navigator.userAgent into a string and look for "iPhone".

    If it's an iPhone, replace the document's URL with the URL of your video or audio.

    Then embed the regular video or audio by calling QT_WriteOBJECT, passing the video or audio's name, the width, the height (adding 16 for a controller), two single quotes with nothing between them (don't ask), and any parameters you want to pass as name/value pairs, for example, 'autoplay','true', or 'bgcolor', 'black.

    In most situations, you just need to replace path/to/video.m4v with the path to your video or audio file; replace width with the width of your video, and height with the height of your video and plus 16. For audio, the width and height is size of controller, for example, '400', '30'.

    If you want your video to play automatically, please insert 'autoplay','true'.

  4. Link to the page from another page. The iPhone/iPad/iPod will open the video in a fullscreen player, you can always return to the page you linked from by tapping the done button at the top.

Sample Code:

<html>
<head>
<script src="AC_QuickTime.js" language="JavaScript" type="text/javascript">
<script language="javascript">
  var ua = navigator.userAgent ;
  if (ua.indexOf("iPhone") > 0) document.location.replace("h264_480x270.m4v");
</script>
</head>
<body>
<script language="javascript">
  QT_WriteOBJECT('h264_480x270.m4v', '480','286', '', 'autoplay', 'true');
</script>
</body>
</html>

Sample Videos:

You could visit the following sample links to watch video or listen to audio on your iPhone/iPad/iPod directly.

If your computer (PC or Mac) has installed QuickTime, you could see the video and hear audio on web browser when clicking the sample links.

 

Top

 

Home | Getting Started | Download | Buy Now! | Screen Shots | Support | Contact | Links
Copyright © 2009-2014 Hoo Technologies All rights reserved. Privacy Policy