Search Unity

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

my example can not hear audio when i click yellow button

Discussion in 'Unity Render Streaming' started by Handsome-Wisely, Jul 1, 2022.

  1. Handsome-Wisely

    Handsome-Wisely

    Joined:
    Mar 20, 2013
    Posts:
    102
    i can run broadcast example ok. but when i click audio button, my web not play audio.

    upload_2022-7-1_16-43-3.png

    who can tell me how to check this problem.
     
  2. kannan-xiao4

    kannan-xiao4

    Unity Technologies

    Joined:
    Nov 5, 2020
    Posts:
    76
    Can you check audio level on browser using chrome://webrtc-internals/ ?

    and please check browser version, browser audio setting, etc..
     
  3. Handsome-Wisely

    Handsome-Wisely

    Joined:
    Mar 20, 2013
    Posts:
    102
    upload_2022-7-6_14-27-33.png
    i check js code and find,VideoPlayer Sample,(right)can hear audio,but left
    Multiplay Sample can not hear。and they code。
    how can i add audio in left code!thank you!
     
  4. Handsome-Wisely

    Handsome-Wisely

    Joined:
    Mar 20, 2013
    Posts:
    102
    now i can get audio in left code by add code in video-player
    Code (JavaScript):
    1. this.pc.addTransceiver('audio', { direction: 'recvonly' });
    2.     this.pc.addTransceiver('video', { direction: 'recvonly' });
    3.  
    but i have another problem is when the second player connected,he can not hear audio.