Skip to content

Commit

Permalink
added callbacks to seekTo
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachanski committed Nov 7, 2023
1 parent e1af4d3 commit e7dd8f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions www/Media.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)

Check failure on line 107 in www/Media.js

View workflow job for this annotation

GitHub Actions / Lint Test

Missing semicolon
},
this.errorCallback,
onError,
'Media',
'seekToAudio',
[this.id, milliseconds]
Expand Down

0 comments on commit e7dd8f0

Please sign in to comment.