Created
February 9, 2011 01:39
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added write up on my site. Bookmarklet to enable AirPlay on all web videos.