onHostUnmounted method

void onHostUnmounted()

Called by DigiaHost when it is removed from the widget tree.

Implementation

void onHostUnmounted() {
  _logIfVerbose('DigiaHost unmounted.');
  // The PiP's overlay entry goes with the host, so the window can no longer
  // paint. Left running, the orchestrator would hold its player and timers for
  // a campaign nobody can see, report no terminal event, and — because the
  // renderer reads live orchestrator state — put the stale window straight
  // back on screen when a host next mounts. Every other surface is tied to a
  // widget the host owns and is torn down with it.
  _pipOrchestrator.dismiss(PipDismissReason.hostTeardown);
  _floaterStoryOrchestrator.dismiss(PipDismissReason.hostTeardown);
}