RenderAreaListenerOnOpenedConnection Method |
Triggered when a client connects to the OIV.RemoteViz.Rendering.RenderArea.
Namespace: OIV.RemoteViz.Rendering
public virtual void OnOpenedConnection( RenderArea renderArea, Connection connection, FrameEncoders frameEncoders )
: the OIV.RemoteViz.Rendering.RenderArea requested by the connection
: frame encoders for interactive and still frames Supported pairs of frame encoders (still/interactive): JPEG/JPEG, PNG/JPEG, H264_NVENC/H264_NVENC, H264_OPENH264/H264_OPENH264, VP9_VPX/VP9_VPX Default behavior: PNG/JPEG.
Use this method to set the encoding format for images sent to the client, using the frameEncoders parameter. The default is JPEG for interactive frames (i.e. while the user is interacting) and PNG for still frames. Video encoding (H264 or VP9) may provide better performance by reducing bandwidth requirements. Use the OIV.RemoteViz.Rendering.ConnectionSettings.IsSupportedEncoders(OIV.RemoteViz.Rendering.FrameEncoders) method to query if the proposed encoders are available. If a requested frame encoder cannot be initialized, OIV.RemoteViz.Rendering.RenderAreaListener.OnRefusedEncoder(OIV.RemoteViz.Rendering.RenderArea, OIV.RemoteViz.Rendering.Connection, OIV.RemoteViz.Rendering.FrameEncoders) will be triggered. Otherwise, OIV.RemoteViz.Rendering.RenderAreaListener.OnInitializedConnection(OIV.RemoteViz.Rendering.RenderArea, OIV.RemoteViz.Rendering.Connection, OIV.RemoteViz.Rendering.FrameEncoders) will be triggered.