Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
karasusan committed Sep 21, 2021
1 parent 9afaf01 commit 8eb9e4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tests/Runtime/ContextTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ public void CreateAndDeleteVideoTrack()
var rt = new UnityEngine.RenderTexture(width, height, 0, format);
rt.Create();
var source = context.CreateVideoTrackSource();
#if UNITY_WEBGL
var track = context.CreateVideoTrack(source, System.IntPtr.Zero, width, height);
#else
var track = context.CreateVideoTrack("video", source);
#endif
context.DeleteRefPtr(track);
context.DeleteRefPtr(source);
context.Dispose();
Expand Down
4 changes: 4 additions & 0 deletions Tests/Runtime/MediaStreamTrackTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public void EqualIdWithVideoTrack()
{
var guid = Guid.NewGuid().ToString();
var source = new VideoTrackSource();
#if UNITY_WEBGL
var track = new VideoStreamTrack(WebRTC.Context.CreateVideoTrack(source.self, IntPtr.Zero, 256, 256));
#else
var track = new VideoStreamTrack(WebRTC.Context.CreateVideoTrack(guid, source.self));
#endif
Assert.That(track, Is.Not.Null);
Assert.That(track.Id, Is.EqualTo(guid));
track.Dispose();
Expand Down

0 comments on commit 8eb9e4b

Please sign in to comment.