MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / pause

Method pause

src/lib/AudioPlayer.ts:313–324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

311 }
312
313 pause (): void {
314 if (!this._isPlaying) {
315 return;
316 }
317
318 this.pausedAt = this.audioContext.currentTime - this.startedAt;
319 this._isPlaying = false;
320 this._isPaused = true;
321
322 // This will call onended, which we suppress, and then we clean up.
323 this.cleanup();
324 }
325
326 stop (): void {
327 if (!this.sourceNode && !this._isPlaying) {

Callers 6

cleanupPlayerMethod · 0.80
applyMethod · 0.80
cleanupVideoElementMethod · 0.80
onLoadMethod · 0.80
revertMethod · 0.80
stopAmbientFunction · 0.80

Calls 1

cleanupMethod · 0.95

Tested by

no test coverage detected