Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Microsoft MixedReality-WebRTC plugin issues with the remote peer

Discussion in 'Code Editors & IDEs' started by isaako, Feb 20, 2021.

  1. isaako


    Nov 25, 2016
    Hi all.

    I'm following this tutorial
    And I have the local peer working perfectly. But I'm working on the remote peer and trying to establish the webrtc connection but the remote video is not being displayed in the local machine (The webrtc connection seems to be fine, the offer message and answer message look good), so I wonder if my remote peer setup is wrong. This is what I did for the remote peer. First I created this receiver script:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using Microsoft.MixedReality.WebRTC.Unity;
    5. using System.Diagnostics;
    7. public class ReceiverScript : MonoBehaviour
    8. {
    9.     public Microsoft.MixedReality.WebRTC.Unity.VideoRenderer videoRenderer;
    10.     public Microsoft.MixedReality.WebRTC.Unity.VideoReceiver videoReceiver;
    12.     public void startVideoStream()
    13.     {
    14.         videoRenderer.StartRendering(videoReceiver.VideoTrack);
    15.     }
    17.     public void stopVideoStream()
    18.     {
    19.         //videoRenderer.StopRendering(webcamsource.Source);
    20.     }
    22. }
    Then I attached it to a game object that has different scripts, and attached as reference a VideoRenderer and a VideoReceiver component that were created in a RemoteVideoPlayer object.

    And then in that RemoteVideoPlayer object that was created I assigned the respective methods in the VideoReceiver component

    But it doesn't work. Maybe the problem is that my Peer connection component is missing some information? I don't know what else to add to that component. The tutorial doesn't mention anything about adding more information to it

  2. SamuelPoulin


    Dec 10, 2017
    Did you ever manage to get it running? Also trying to make it work between a hololens headset and a browser.
  3. JeSuisUnePoule


    Mar 24, 2022
    I am having a similar issue, if someone has a Fix I would gladly have it !