// %BANNER_BEGIN%
// ---------------------------------------------------------------------
// %COPYRIGHT_BEGIN%
// Copyright (c) (2018-2022) Magic Leap, Inc. All Rights Reserved.
// Use of this file is governed by the Software License Agreement, located here: https://www.magicleap.com/software-license-agreement-ml2
// Terms and conditions applicable to third-party materials accompanying this distribution may also be found in the top-level NOTICE file appearing herein.
// %COPYRIGHT_END%
// ---------------------------------------------------------------------
// %BANNER_END%
namespace UnityEngine.XR.MagicLeap
{
///
/// MLWebRTC class contains the API to interface with the
/// WebRTC C API.
///
public partial class MLWebRTC
{
///
/// Class that represents an ice candidate used by the MLWebRTC API.
///
public partial struct IceCandidate
{
///
/// Gets the candidate id.
///
public string Candidate { get; private set; }
///
/// Gets the id of the source media component from which the candidate draws data.
///
public string SdpMid { get; private set; }
///
/// Gets the index that indicates which media source is associated with the candidate.
///
public int SdpMLineIndex { get; private set; }
///
/// Factory method used to create a new IceCandidate object.
///
/// The candidate id.
/// The id of the source media component from which the candidate draws data.
/// Index that indicates which media source is associated with a candidate.
/// An ice candidate object with the given handle.
public static IceCandidate Create(string candidate = "", string sdpMid = "", int sdpMLineIndex = 0)
{
IceCandidate iceCandidate = new IceCandidate()
{
Candidate = candidate,
SdpMid = sdpMid,
SdpMLineIndex = sdpMLineIndex,
};
return iceCandidate;
}
}
}
}