JoJo JoJo - 4 months ago 51
Javascript Question

Enable iPad Airplay on HTML5 video

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

// Prototype JS framework
new Element(
'video', {
id: 'video0',
src: '',
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?


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


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


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