Browser mouse

Whether the viewer sees the browser's own mouse cursor over the stream, and what shape it has. It is shown by default. Only your Unreal app can change it during a session; your web page cannot.

At a glance

Triggered fromWhat you callWorks on the production player today
iframeno message for itNot available on the production player — ask your app to do it
Web SDKno call for itNot available on the production player — ask your app to do it
UnrealSend Pixel Streaming Response {"cmd":"showBrowserMouse"}, hideBrowserMouse, ToggleBrowserMouse, or setBrowserSideMouseCursorToYes

The default

Show Browser Mouse, on the Common tab of your configuration, is on by default: viewers see a normal arrow (cursor:default). Turned off, the browser draws no cursor over the stream (cursor:none). Then the viewer only sees a cursor if your app draws one, and an app-drawn cursor lags behind the hand by a round trip. Why the browser cursor is the better one.

How the calls travel

Only the app can switch the cursor during a session. A page that wants to change it has to ask the app, which then sends the command.

Demos

iframe

Not available on the production player.

Web SDK

Not available on the production player.

Unreal

A sample project that hides and shows the cursor.

Demo coming soon

How to do it

iframe

There is no message for this. To change the cursor from your page, send your app a message from your page (Embedding › Page → Unreal) and let the app send the Unreal command below.

To set it for every session instead, use Show Browser Mouse on the Common tab of your configuration.

Web SDK

There is no call for this. To change the cursor from your page, send your app a message from your page (Embedding › Page → Unreal) and let the app send the Unreal command below.

To set it for every session instead, use Show Browser Mouse on the Common tab of your configuration.

Unreal

Add a PixelStreamingInput component to an actor and send this with Send Pixel Streaming Response:

{"cmd":"hideBrowserMouse"}
{"cmd":"showBrowserMouse"}
{"cmd":"ToggleBrowserMouse"}

The names are exact, including the capitals: ToggleBrowserMouse starts with a capital T, the other two do not.

Change the cursor's shape with any CSS cursor, written as a CSS declaration:

{"cmd":"setBrowserSideMouseCursorTo","value":"cursor:pointer"}
{"cmd":"setBrowserSideMouseCursorTo","value":"cursor:crosshair"}

A new shape shows only while the browser cursor is on: it is kept, and used again after showBrowserMouse.

Troubleshooting

What you seeWhyWhat to do
Two cursors, one lagging behindYour app draws its own cursor (Show Mouse Cursor in the Player Controller) as well as the browser's.Turn the app's cursor off and keep the browser cursor. Why.
No cursor at allShow Browser Mouse is off, or the app sent hideBrowserMouse, and the app draws none.Send showBrowserMouse, or switch the setting back on.
The command does nothingA misspelt name or wrong capitals; unknown commands are ignored without a message.Copy the names exactly as above.
A new cursor shape does not appearThe browser cursor is off; a shape only applies while it is shown.Send showBrowserMouse as well.

Last updated