Created
November 25, 2013 14:21
-
-
Save klipstein/7641887 to your computer and use it in GitHub Desktop.
Video autoplay on Android 2.3 stock browser
This file contains hidden or 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
// Embed that snippet on your site to rick-roll every Android 2.3 user | |
// by opening a video in fullscreen without asking for user permission | |
var v = document.createElement('video'); | |
v.src = 'http://vid297.photobucket.com/albums/mm238/daystar170/RickRoll.mp4'; | |
v.load(); | |
document.body.appendChild(v); | |
setTimeout(function() { | |
// jumping to a certain position is also possible | |
// v.currentTime = 0; | |
v.play(); | |
}, 0); | |
v.play(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment