setInterval is Fail on WebOS

edited August 2012 in Packaging Apps
Hi there fellow members of the cult of Enyo,

setInterval works on my PC in browsers such as firefox and chromium. When I package and deploy to HP Touchpad or Veer my Pomodoro App morphs from a Get Things Done app into a Rip My Own Hair Out app because of its sporadic ticking. I set the tick method to occur every thousand milliseconds.

Anybody have any ideas? BTW, I will be at the boot camp at Groupon this week. Look for a tall and handsome guy who looks somewhat like Gerard Butler.


  • Is this just when your app is in the background that you have problems? I know webOS delays those to background apps to reduce battery consumption.

    I'd suggest that you use setTimeout/setInterval to get callbacks, but rely on actual Date objects to do the time elapsed measurements.
  • edited August 2012
    Thanks for the response, Ben. It's when the app is focused. I setInterval to call a Timer object's countdown. That bubbles up, and then it's owner calls the play method on an HTML5 Audio object. I've noticed the same thing in Midori and Rekonq, but not Firefox, Chromium, etc.

    BTW, the countdown itself seems fine, it's playing the audio which is sporadic. The app has an option to turn off the ticking sound.
  • ah, HTML audio objects on webOS have a history of being not-very reliable. In fact, some developer went as far as making their own PDK plugins to provide better audio support.
  • If I remember correctly, the problems weren't exclusive to webOS -- older versions of webkit had issues with re-playing audio as well as with short audio files such as .
  • I can verify that many of those audio issues were present in Chrome at least through v18, though I've heard people say that significant work was put into the html audio implementation in webkit since then.
  • Thanks guys. Too bad about that. I noticed the replaying problem occasionally in Chromium.
Sign In or Register to comment.