diff --git a/Runtime/Scripts/MediaStreamTrack.cs b/Runtime/Scripts/MediaStreamTrack.cs
index e633af3b2c..3bf49047a5 100644
--- a/Runtime/Scripts/MediaStreamTrack.cs
+++ b/Runtime/Scripts/MediaStreamTrack.cs
@@ -4,13 +4,27 @@
namespace Unity.WebRTC
{
///
- ///
+ /// Represents a single media track within a stream.
///
+ ///
+ /// `MediaStreamTrack` represents a single media track within a stream.
+ /// Typically, these are audio or video tracks, but other track types may exist as well.
+ /// Each track is associated with a `MediaStream` object.
+ ///
+ ///
+ /// mediaStreamTracks = mediaStream.GetTracks();
+ /// ]]>
+ ///
+ ///
public class MediaStreamTrack : RefCountedObject
{
///
- ///
+ /// Boolean value that indicates whether the track is allowed to render the source stream.
///
+ ///
+ /// When the value is `true`, a track's data is output from the source to the destination; otherwise, empty frames are output.
+ ///
public bool Enabled
{
get
@@ -24,19 +38,19 @@ public bool Enabled
}
///
- ///
+ /// TrackState value that describes the status of the track.
///
public TrackState ReadyState =>
NativeMethods.MediaStreamTrackGetReadyState(GetSelfOrThrow());
///
- ///
+ /// TrackKind value that describes the type of media for the track.
///
public TrackKind Kind =>
NativeMethods.MediaStreamTrackGetKind(GetSelfOrThrow());
///
- ///
+ /// String containing a unique identifier (GUID) for the track.
///
public string Id =>
NativeMethods.MediaStreamTrackGetID(GetSelfOrThrow()).AsAnsiStringWithFreeMem();
@@ -47,16 +61,27 @@ internal MediaStreamTrack(IntPtr ptr) : base(ptr)
}
///
- ///
+ /// Finalizer for MediaStreamTrack.
///
+ ///
+ /// Ensures that resources are released by calling the `Dispose` method
+ ///
~MediaStreamTrack()
{
this.Dispose();
}
///
- ///
+ /// Disposes of MediaStreamTrack.
///
+ ///
+ /// `Dispose` method disposes of the `MediaStreamTrack` and releases the associated resources.
+ ///
+ ///
+ ///
+ ///
public override void Dispose()
{
if (this.disposed)
@@ -72,8 +97,16 @@ public override void Dispose()
}
///
- /// Disassociate track from its source(video or audio), not for destroying the track
+ /// Stops the track.
///
+ ///
+ /// `Stop` method disassociates the track from its source (video or audio) without destroying the track.
+ ///
+ ///
+ ///
+ ///
public void Stop()
{
WebRTC.Context.StopMediaStreamTrack(GetSelfOrThrow());