deanm / plask

Plask is a multimedia programming environment.
www.plask.org
Other
443 stars 38 forks source link

Added pause method to AVPlayer #35

Closed vorg closed 9 years ago

vorg commented 9 years ago
this.audio = new plask.AVPlayer();
this.audio.appendFile('test.mp3');
this.audio.play();
this.audio.pause();
deanm commented 9 years ago

I always just use setRate(0), which the documentation says pause() is equivalent to. I had JS functions like:

this.pause = function() { player.setRate(0); }; this.resume = function() { player.setRate(1); }; this.rate = function() { return player.rate(); };

That said I'm not opposed to adding it to the native interface

vorg commented 9 years ago

Ok, that makes sense. I'll use it this way instead of pause.