Cordova Media Thread Warning

I’m using ionic framework to develop a song player application on iOS.
I use cordova media plugin to play music.
The user can listen to music online, or he/she can download the music to filesystem and listen to it locally.
So I have to check file existence and then play the music.
For some songs the player plays correctly, but whenever the app has “Thread Warning” the song does not play.

$cordovaFile.checkFile(cordova.file.documentsDirectory, "song-" + songId)
    .then(function () {
        var source = cordova.file.documentsDirectory + "song-" + songId;
        source = source.replace('file://','');
        $ = new Media(source);
    }, function() {
        var source = "" + songId;
        $ = new Media(source);

The warning is: THREAD WARNING: [‘Media’] took ‘12.166992’ ms. Plugin should use a background thread.