| | 12-21-2012, 03:17 PM Thread Author #3
Latest OS Webworks Backlight Hack
The video element only has to be a second long. It is played using HTML5 video like this:
<video width="320" height="240" controls>
* <source src="movie.mp4" type="video/mp4">
* <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
You remove the controls and add autoplay="autoplay" tag, and put it all inside a HIDDEN DIV so it plays in background somewhere hidden. Also, make a video like 16x16 pixels only and maybe half a second long, so it is a tiny file, since all we need it for is the keep screen awake.
Then using SetInterval or SetTimeout you repeatedly call your function that plays the video. Every time a video plays it seems to reset the backlight timer, or at least keep it on.
Make just a simple app doing that and it should work. The code I based it on is found here:
In case the link above doesn't show up, Google "sleep tablet webworks community api".
Turns out you actually don't seem to need the AIR extension and to install that other stuff in the ext folder. Just having a video playing will keep things awake even without the sleep extension above, but that is the code I base it on.
Not the most efficient way, but for now webworks doesn't give us any other option and there is no options to put in the config.xml file at the moment either (except runwhenbackgrounded but that doesnt keep screen on either).
Sent from my BlackBerry 9810 using Crackberry Tapatalk Forum app