Skip to content

Latest commit

 

History

History
86 lines (54 loc) · 3.48 KB

File metadata and controls

86 lines (54 loc) · 3.48 KB

Video Streaming

The base class for sending video is VideoStreamSender, and the base class for receiving video is VideoStreamReceiver. And various components are implemented using the inheritance relation. Components are provided for the sender and receiver sides.

Note

The choice of video codec is currently limited. Use H.264 if using a hardware encoder, or VP8 if using a software encoder.

VideoStreamSender component

This component sends the texture.

VideoStreamSender inspector

Properties

Parameter Description Default
Streaming Size Size of the frame buffer used for streaming 1280, 720
Anti-aliasing The antialiasing level for the RenderTexture None
Depth Buffer The precision of the render texture's depth buffer in bits No depth buffer

ScreenStreamSender component

This component sends the image of the main display.

ScreenStreamSender inspector

Properties

Parameter Description Default
Streaming Size Size of the frame buffer used for streaming 1280, 720
Anti-aliasing The antialiasing level for the RenderTexture None
Depth Buffer The precision of the render texture's depth buffer in bits No depth buffer

CameraStreamSender component

This component streams the Camera component's camera rendering results. Uses Target Texture to store the rendering results.

Note

You can attach the Target Texture to the Camera component. If Target Texture is attached on Camera, use that Render Texture setting first.

CameraStreamSender inspector

Properties

Parameter Description Default
Streaming Size Size of the frame buffer used for streaming 1280, 720
Anti-aliasing The antialiasing level for the RenderTexture None
Depth Buffer The precision of the render texture's depth buffer in bits No depth buffer

WebCamStreamSender component

This component streams the WebCamTexture rendering results. Please refer WebCamTexture pages.

WebCamStreamSender inspector

Note

When building application for iOS platform, you need set Camera Usage Description on Player Settings. If not set this, your application exits. (refer this page)

Set Camera Usage Description

Properties

Parameter Description Default
Streaming Size Size of the frame buffer used for streaming 1280, 720
Device Index Index of WebCamTexutre.devices to use 0

VideoStreamReceiver component

This component receives a videostream and exposes a texture that rendered the receiving frame buffer.

VideoStreamReceiver inspector

Properties

Parameter Description Default
Streaming Size Size of the frame buffer used for streaming 1280, 720
Connection Id ID of receiving videostream Empty