MCPcopy
hub / github.com/andrewrk/groovebasin / startEncoderDetach

Function startEncoderDetach

lib/player.js:507–523  ·  view source on GitHub ↗
(self, cb)

Source from the content-addressed store, hash-verified

505}
506
507function startEncoderDetach(self, cb) {
508 if (!self.desiredEncoderAttachState) return;
509 self.desiredEncoderAttachState = false;
510
511 if (self.pendingEncoderAttachDetach) return;
512 self.pendingEncoderAttachDetach = true;
513 self.grooveEncoder.detach(function(err) {
514 self.pendingEncoderAttachDetach = false;
515
516 if (err) {
517 self.desiredEncoderAttachState = true;
518 cb(err);
519 } else if (self.desiredEncoderAttachState) {
520 startEncoderAttach(self, cb);
521 }
522 });
523}
524
525Player.prototype.getBufferedSeconds = function() {
526 if (this.recentBuffers.length < 2) return 0;

Callers 2

startEncoderAttachFunction · 0.85
player.jsFile · 0.85

Calls 1

startEncoderAttachFunction · 0.85

Tested by

no test coverage detected