diff --git a/www/Media.js b/www/Media.js index 8d5ae655..133fc02d 100644 --- a/www/Media.js +++ b/www/Media.js @@ -39,11 +39,9 @@ var mediaObjects = {}; * @param statusCallback The callback to be called when media status has changed. * statusCallback(int statusCode) - OPTIONAL * - * @param durationUpdateCallback The callback to be called when the duration updates. - * durationUpdateCallback(float duration) - OPTIONAL - * + * @param createdCallback The callback to be called after creation. */ -var Media = function (src, successCallback, errorCallback, statusCallback, durationUpdateCallback) { +var Media = function (src, successCallback, errorCallback, statusCallback, createdCallback) { argscheck.checkArgs('sFFF', 'Media', arguments); this.id = utils.createUUID(); mediaObjects[this.id] = this; @@ -51,10 +49,9 @@ var Media = function (src, successCallback, errorCallback, statusCallback, durat this.successCallback = successCallback; this.errorCallback = errorCallback; this.statusCallback = statusCallback; - this.durationUpdateCallback = durationUpdateCallback; this._duration = -1; this._position = -1; - exec(null, this.errorCallback, 'Media', 'create', [this.id, this.src]); + exec(createdCallback, this.errorCallback, 'Media', 'create', [this.id, this.src]); }; // Media messages