Skip to content

Commit

Permalink
replaced duration callback with created callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachanski committed Nov 7, 2023
1 parent 691b453 commit e1af4d3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions www/Media.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,19 @@ 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;
this.src = src;
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
Expand Down

0 comments on commit e1af4d3

Please sign in to comment.