Skip to main content
Version: v4.0

MetaEditor

Player component. If you put your code in children, then it will be displayed on top of the video.

Player.tsx
import { MetaEditor } from "pixel-streaming";

export default function PlayerView() {

return (
<MetaEditor
debugMode
showToolbar
psHost="ws://127.0.0.1:80"
psConfig={{
autoPlay: false,
autoConnect: true,
startMuted: true,
hoveringMouse: true,
fakeMouseWithTouches: true,
matchViewportRes: true,
}}
>
<div>
Content & Buttons
</div>
</MetaEditor>
);
}

Settings

NameDescription
children?React.ReactElement — optional
debugModeboolean — Show notifications when commands are sent.
showToolbarboolean — Show developer panel
psHoststring — Host running Signaling Server. For local development ws://127.0.0.1:80 For production version wss://yourdomain.com (SSL certificate required)
psConfigobject — Pixel Streaming Configuration

psConfig

NameDescription
autoPlayboolean — Play videos automatically. Attention, it works if startMuted: true
autoConnectboolean — Open webrtc connection automatically
startMutedboolean — Mute sound
hoveringMouseboolean — If true, then the cursor will not disappear
fakeMouseWithTouchesboolean — Emulate mouse clicks on mobile devices
matchViewportResboolean — Send command to Unreal Engine on resolution change