Add note about seekable

This commit is contained in:
Jordan Eldredge 2018-07-26 20:54:02 -07:00
parent 5c243949a5
commit 3b9e48ef80

View file

@ -112,6 +112,12 @@ export default class ElementSource {
}
seekToTime(time) {
/* TODO: We could check if this is actually seekable:
const { seekable } = this._audio;
for (let i = 0; i < seekable.length; i++) {
console.log("start", seekable.start(i), "end", seekable.end(i));
}
*/
this._audio.currentTime = clamp(time, 0, this.getDuration());
this._emitter.trigger("positionChange");
}