Skip to content

Instantly share code, notes, and snippets.

@jc
Created February 9, 2011 01:39
Show Gist options
  • Save jc/817718 to your computer and use it in GitHub Desktop.
Save jc/817718 to your computer and use it in GitHub Desktop.
Bookmarklet to enable AirPlay on iOS 4.3 devices see http://jamesclarke.net/notes/enable-airplay-on-all-web-video
//Enabling AirPlay on iOS for all videos
//James Clarke <http://jamesclarke.net>
//See <http://jamesclarke.net/notes/enable-airplay-on-all-web-video> for a description.
//in one line
javascript:[].slice.call(document.querySelectorAll('embed,video'),0).map(function(e){e.setAttribute('x-webkit-airplay','allow');e.setAttribute('airplay','allow')});var w = window.open('about:blank');var d = w.document;d.open();d.write(document.documentElement.innerHTML);d.close();
//human readable
javascript:[].slice.call(
document.querySelectorAll('embed,video'),0).map(
function(e) {
e.setAttribute('x-webkit-airplay','allow');
e.setAttribute('airplay','allow')
});
var w = window.open('about:blank');
var d = w.document;
d.open();
d.write(document.documentElement.innerHTML);
d.close();
@jc
Copy link
Author

jc commented Feb 10, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment