Arcware WebRTC Plugin
Javascript/Typescript module to connect any frontend to Unreal Engine 4 app with pixel streaming enabled through signalling WS.
Getting started
import { WebRTCClient } from "@arcware-cloud/webrtc-plugin";
const webrtc_client = new WebRTCClient(args);
<div ref="sizeContainer">
<div ref="videoContainer">
<video ref="videoRef" />
</div>
</div>;
const sizeContainerRef = React.useRef();
const containerRef = React.useRef();
const videoRef = React.useRef();
<div ref={sizeContainerRef}>
<div ref={containerRef}>
<video ref={videoElRef} />
</div>
</div>;
const args = {
address: "Signalling WS URL",
packageName: "Name of the package (if there are multiple applications)",
settings: {},
sizeContainer: this.$refs.sizeContainer,
container: this.$refs.videoContainer,
videoRef: this.$refs.videoRef,
sizeContainer: this.sizeContainerRef.current,
container: this.containerRef.current,
videoRef: this.videoRef.current,
playOverlay: true,
loader: (val) => {},
};
const webrtc = new WebRTCClient(args);
const emitUIInteraction = this.webrtc.emitUIInteraction;
Types and Props
Please follow to WebRTCClientProps
interface exported from module to check properties types
SizeContainer, container and videoRef