Class: Screencast

Screencast(world, name)

Base screen sharing class, sending side. Using should be simple - construct and init. All methods except startSharing/stopSharing are internally called, intended to be overridden by subclasses. Receiving side of the screen is implemented by RemoteScreen script.

Constructor

new Screencast(world, name)

Creates but hides meshes.
Parameters:
Name Type Default Description
world the world
name Shared screen screen share name, displayed when sharing. Defaults to user name or id.
Source:

Classes

Screencast

Members

addHandles

Add manupulation handles? Default true.
Source:

callback

Callback executed when sharing state changes, passed true/false
Source:

position

Screen position, default 0,3,0
Source:

rotation

Screen rotation, default Math.PI - away from presenter
Source:

screenShare

Contains VRObject used to exchange screens share messages, exists only on the sending side
Source:

size

Screen size, default 3. Height is fixed, width may scale accordingly.
Source:

text

text to display on the share screen button, by default Share screen
Source:

Methods

added()

WorldListener interface
Source:

deleteSharedObject()

Internally used to delete the shared object.
Source:

dispose()

Clean up.
Source:

init()

Initialize the sharing component. Requires functional WorldManager attached to the world, so is safe to call from World.entered() method, or after it has been called.
Source:

removed()

WorldListener interface
Source:

setupStreaming()

Called from init(). Attaches itself to MediaStreams, creates new MediaStreams if required. Registers handleSceneEvent() as a SceneListener with WorldManager.
Source:

sharing()

Called when sharing starts/stops (shared object is added/removed), executes callback
Source:

startSharing()

Starts the screencast: creates new shared VRObject, and calls MediaStreams.shareScreen().
Source:

stopSharing()

Stop sharing and delete shared object.
Source: