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

Method revert

src/actions/Play.ts:404–414  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

402 }
403
404 override async revert(): Promise<void> {
405 if (typeof this.mediaKey !== 'undefined') {
406 this.engine.removeMediaPlayer(this.type, this.mediaKey);
407 } else if (this.player instanceof Array) {
408 for (const player of this.player) {
409 if (!player.paused && !player.ended) {
410 player.pause();
411 }
412 }
413 }
414 }
415
416 override async didRevert(): Promise<ActionRevertResult> {
417 const currentState = this.engine.state(this.type);

Callers

nothing calls this directly

Calls 2

removeMediaPlayerMethod · 0.80
pauseMethod · 0.80

Tested by

no test coverage detected