2

I'm doing this to enable Airplay on HTML5 video for my iPad 1st generation with iOS 4.3.1.

// Prototype JS framework
$('videoContainer').appendChild(
    new Element(
        'video', {
            id: 'video0',
            src: 'http://shapeshed.com/examples/HTML5-video-element/video/320x240.m4v',  
            controls: 'true',
            width: '200',
            height: '200',
        }
    )
);

$('video0').writeAttribute('x-webkit-airplay', 'allow');

When I turn on airplay, all I hear is audio on the TV. How do I enable video too?

Edit:

According to Ben Dodson, you have to re-embed the video. I did this:

$('videoContainer').update($('videoContainer').innerHTML);

Is there any way around this? Seems so hacky and it's wasted processing.

JoJo
  • 19,587
  • 34
  • 106
  • 162

2 Answers2

0

In old version of iOS maximum resolution supporting is 1024*576, However your resolution is normal. Please convert the video using any video converter to .mp4 or H.264. .m4v is not supporting format.

unnikrishnan
  • 11
  • 1
  • 5
0

Try reformatting it as a .mp4 movie, and make sure that it is H.264 video with AAC audio. It has to be H.264, or the iPad can't steam it. (Got this from http://macosrumors.com/2011/01/12/first-look-mobile-safari-airplay/)

Remixz
  • 143
  • 1
  • 5
  • It was not an encoding issue. I got it to work with the same video. See my edit above. – JoJo Mar 30 '11 at 00:27
  • Okay. Just wondering, do you have to embed it with Prototype? Or can you just flat out embed it with – Remixz Mar 30 '11 at 00:31
  • Straight out writing to `innerHTML` also works, but it looks so ugly. – JoJo Mar 30 '11 at 00:38
  • Ahh, okay. Then I'm sunk, haha. Sorry! – Remixz Mar 30 '11 at 00:40
  • Whatever. This restriction is as stupid as iOS4 disabling autoplay. I'll just deal with crappy code. – JoJo Mar 30 '11 at 00:54