Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Unity render streming video not appearing in web browser

Discussion in 'Unity Render Streaming' started by jquery404, Apr 18, 2022.

  1. jquery404

    jquery404

    Joined:
    May 21, 2012
    Posts:
    16
    I tried to run the example file that comes with the package.
    Data is passing fine to unity from the browser, when I turn on/off the light it works fine in unity.
    1.jpg

    But the video is not showing in the browser. Same thing happened in the bidirectional example
    My webcam from browser shows up in unity remote video box, but the Unity local camera is not showing up in the browser.
    2.jpg

    Did I miss something

    I'm running the all example from http://localhost (not https)

    I am running the WebApp example and started the server using the following
    Code (JavaScript):
    1.  npm run start -- -w
     
    Last edited: Apr 18, 2022
  2. kannan-xiao4

    kannan-xiao4

    Unity Technologies

    Joined:
    Nov 5, 2020
    Posts:
    76
    Could you tell me com.unity.renderstreaming package version ( or Github branch or commit ) and OS?
    Also, there may be an error log in the Editor or browser, so please let me know.
     
  3. jquery404

    jquery404

    Joined:
    May 21, 2012
    Posts:
    16
    In Unity, I'm using the com.unity.renderstreaming 3.0.1-preview package.
    for web app I downloaded the latest src code from github release 3.1.0-exp.3
    I have tried this on both Windows and Mac OS, Chrome and Firefox.
    I didn't see any error.

    here is the message which is shown on the webapp side

    Code (JavaScript):
    1. {
    2.   type: 'offer',
    3.   from: 'ee88cad6-cfd9-499a-9168-3f0cf5173114',
    4.   data: {
    5.     sdp: 'v=0\r\n' +
    6.       'o=- 3464378051083032747 2 IN IP4 127.0.0.1\r\n' +
    7.       's=-\r\n' +
    8.       't=0 0\r\n' +
    9.       'a=group:BUNDLE 0\r\n' +
    10.       'a=extmap-allow-mixed\r\n' +
    11.       'a=msid-semantic: WMS\r\n' +
    12.       'm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\n' +
    13.       'c=IN IP4 0.0.0.0\r\n' +
    14.       'a=ice-ufrag:51R4\r\n' +
    15.       'a=ice-pwd:QN5RvCnpM9G6iIk/mPooZwox\r\n' +
    16.       'a=ice-options:trickle\r\n' +
    17.       'a=fingerprint:sha-256 B1:87:B4:DB:B4:C2:21:CB:23:BD:9B:0C:9E:62:6E:F9:87:4B:CD:B5:52:FA:39:70:26:48:88:E1:86:E0:73:FB\r\n' +
    18.       'a=setup:actpass\r\n' +
    19.       'a=mid:0\r\n' +
    20.       'a=sctp-port:5000\r\n' +
    21.       'a=max-message-size:262144\r\n',
    22.     connectionId: 'ee88cad6-cfd9-499a-9168-3f0cf5173114'
    23.   }
    24. }
    25. {
    26.   type: 'candidate',
    27.   from: 'ee88cad6-cfd9-499a-9168-3f0cf5173114',
    28.   data: {
    29.     candidate: 'candidate:1798856119 1 udp 2113937151 1b96e848-8e92-4111-884f-dc3bf85a4ce4.local 56073 typ host generation 0 ufrag 51R4 network-cost 999',
    30.     sdpMLineIndex: '0',
    31.     sdpMid: 0,
    32.     connectionId: 'ee88cad6-cfd9-499a-9168-3f0cf5173114'
    33.   }
    34. }
    35. {
    36.   from: 'ee88cad6-cfd9-499a-9168-3f0cf5173114',
    37.   to: '',
    38.   type: 'answer',
    39.   data: {
    40.     connectionId: 'ee88cad6-cfd9-499a-9168-3f0cf5173114',
    41.     sdp: 'v=0\r\n' +
    42.       'o=- 293129222745296552 2 IN IP4 127.0.0.1\r\n' +
    43.       's=-\r\n' +
    44.       't=0 0\r\n' +
    45.       'a=group:BUNDLE 0\r\n' +
    46.       'a=extmap-allow-mixed\r\n' +
    47.       'a=msid-semantic: WMS\r\n' +
    48.       'm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\n' +
    49.       'c=IN IP4 0.0.0.0\r\n' +
    50.       'b=AS:30\r\n' +
    51.       'a=ice-ufrag:gUtN\r\n' +
    52.       'a=ice-pwd:RvSQJnz2IuxvUatqStPA9rNL\r\n' +
    53.       'a=ice-options:trickle\r\n' +
    54.       'a=fingerprint:sha-256 38:26:72:1A:D5:1A:E8:C0:3E:4F:84:A1:BF:D2:9C:C7:9B:52:46:18:D0:81:E3:AA:29:14:84:E3:3D:E6:A3:85\r\n' +
    55.       'a=setup:active\r\n' +
    56.       'a=mid:0\r\n' +
    57.       'a=sctp-port:5000\r\n' +
    58.       'a=max-message-size:262144\r\n',
    59.     type: 'answer'
    60.   }
    61. }
    62. {
    63.   from: 'ee88cad6-cfd9-499a-9168-3f0cf5173114',
    64.   to: '',
    65.   type: 'candidate',
    66.   data: {
    67.     connectionId: 'ee88cad6-cfd9-499a-9168-3f0cf5173114',
    68.     candidate: 'candidate:1798856119 1 udp 2122260223 192.168.43.236 59748 typ host generation 0 ufrag gUtN network-id 1 network-cost 50',
    69.     sdpMid: '0',
    70.     sdpMLineIndex: 0
    71.   }
    72. }
    and here the unity side

    debug.png
     
  4. kannan-xiao4

    kannan-xiao4

    Unity Technologies

    Joined:
    Nov 5, 2020
    Posts:
    76
    com.unity.renderstreaming 3.0.1-preview package and webapp at release 3.1.0-exp.3 are not compatible.
    We have also changed the WebApp, so please use the same version for the package and the WebApp.
    Please use the Package of com.unity.renderstreaming-exp.3.