player-react
ExitSubScene

ExitSubScene

Exit sub-scene control, only displayed when inside a sub-scene.

How to Use

  • Enable the exit sub-scene control quickly by configuring addons={["ExitSubScene"]}
  • Or manually enable it by importing import { ExitSubScene } from "@icraft/player-react". Manual enabling allows more flexible control over the exit sub-scene control's style.

In general, the enter sub-scene control should be used together with the exit sub-scene control

As shown in the example above, when clicking the cache element, the enter sub-scene control is displayed. After clicking the enter sub-scene control, you'll enter the sub-scene of the cache element. Once inside the sub-scene, the exit sub-scene control will be displayed. Clicking the exit sub-scene control will return you to the previous scene level.

import { ICraftPlayer } from "@icraft/player-react";
 
const style = {
  width: "100%",
  height: "100%",
  position: "relative" as const,
  overflow: "hidden" as const,
};
 
export default () => {
  return (
    <div style={style}>
      <ICraftPlayer
        src='/templates/AWSCloud.iplayer'
        addons={["EnterSubScene", "ExitSubScene"]}
      />
    </div>
  );
};

API

NameDescriptionTypeDefaultRequired
styleStyleReact.CSSPropertiesfalse
classNameClass namestringfalse