diff --git a/www/Media.js b/www/Media.js index 133fc02d..711dfb12 100644 --- a/www/Media.js +++ b/www/Media.js @@ -42,7 +42,7 @@ var mediaObjects = {}; * @param createdCallback The callback to be called after creation. */ var Media = function (src, successCallback, errorCallback, statusCallback, createdCallback) { - argscheck.checkArgs('sFFF', 'Media', arguments); + argscheck.checkArgs('sFFFF', 'Media', arguments); this.id = utils.createUUID(); mediaObjects[this.id] = this; this.src = src; @@ -99,13 +99,14 @@ Media.prototype.stop = function () { /** * Seek or jump to a new time in the track.. */ -Media.prototype.seekTo = function (milliseconds) { +Media.prototype.seekTo = function (milliseconds, onDone, onError) { var me = this; exec( function (p) { me._position = p; + onDone(p) }, - this.errorCallback, + onError, 'Media', 'seekToAudio', [this.id, milliseconds]