Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Question Multiple devices only work when two cameras.

Discussion in 'Unity Render Streaming' started by RistoPaasivirta, Jan 12, 2021.

  1. RistoPaasivirta

    RistoPaasivirta

    Joined:
    Aug 25, 2017
    Posts:
    20
    Hi,

    In the "SimpleRenderStreamingHDRP" example scene If I disable the "Render Streaming Camera 2" then only one device is able to get the video stream.

    After I re-enable the "Render Streaming Camera 2" then multiple devices (tested with 5) is able to get the video stream.
     
    Last edited: Jan 12, 2021
  2. Maktech

    Maktech

    Joined:
    Jan 15, 2015
    Posts:
    31
    It has been awhile since I have been in the code but, does the webserver logic still expect two video streams before enabling the video? Look at the logic of how each video element is setup and how many expected video streams are recognized. app.js and video-player.js look at them both.
     
  3. jamesimmersivevr

    jamesimmersivevr

    Joined:
    Jul 13, 2015
    Posts:
    3
    Hi,

    I changed the line 434 in RenderStreaming.cs to this:
    Code (CSharp):
    1. byte[] bytes = {(byte)UnityEventType.SwitchVideo, 0};
    The other thing I did was disabled the Camera, CameraStreamer and AudioStreamer components on the "Render Streaming Camera 2" game object, but left the Simple Camera Controller component enabled (the RenderStreaming script seems to need a camera controller for each browser client).
     
  4. RistoPaasivirta

    RistoPaasivirta

    Joined:
    Aug 25, 2017
    Posts:
    20
    Ah I see. Thanks for the replies.
    I'll take a look at this again later this week.
     
  5. PilerT

    PilerT

    Joined:
    Aug 18, 2019
    Posts:
    3
    This work for displaying the camera, but not work for control the camera. Thanks anyway.