This is the main point of control for the Hyperbeam API in WebGL. It provides important methods to the JSLib and is REQUIRED in order for the API to function properly. Attach this script directly to a game object and call StartHyperbeamStream to use.
Will notify any registered handlers when the Hyperbeam Stream’s texture is ready. It is eventually called after StartHyperbeamStream
Will notify any registered handlers when control is returned to unity after being handed off by PassControlToBrowser
The instance of the core Hyperbeam object associated with this controller. Allows access to many of the control methods for interacting with the virtual browser. See Hyperbeam for more info
Sets the stream’s volume. A convience accessor for Instance.Volume
Pauses the video stream, but not the audio stream. A convience accessor for Instance.SetVideoPause(value)
void StartHyperbeamStream(string embedUrl)
void PassControlToBrowser(string closeKey, bool ctrl, bool meta, bool alt, bool shift)
Stops unity from intercepting keyboard events and will start sending them to the virtual browser. It will listen for the closeKey along with any modifiers and when pressed will return control back to unity, which can be detected via OnControlReturned
Forcibly takes control back from the attached Hyperbeam Instance if PassControlToBrowser was called on it. It will unregister any event handlers currently registered.