cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerwin Brunner <>
Subject Media getCurrentPosition kills app after a while (cpu usage increases continously
Date Fri, 29 May 2015 10:51:35 GMT

I'm experiencing a very strange behavior in the Media API.
I just play a MP3 file and update the time spent playing.

Here is a very simplistic code:

var self;
self = this;
self.interval = 50;
self.audioFile= "asd.wav"; = new Media(self.audioFile, function() {
   return console.log("Success");
}, function(error) {
   return console.log("Error " + error);

self.getPos = function() {
   return {
     //console.log("pos", pos);
     return window.setTimeout(self.getPos, self.interval);

window.setTimeout(self.getPos, self.interval);

The cpu usage continually increases during usage and after a while the 
whole app freezes or gets totally unresponsive.

I have no clue what causes this increase in CPU usage. Do you have a 
clue what the reason for this could be?

I also found this related question on StackOverflow


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message