public static async Task <WebRtcManager> CreateAsync(IVirtualStudioConnection virtualStudioConnection, StudioComponentDto studioComponent, IJSRuntime jsRuntime, ElementReference receivingVideoElement, ElementReference rtpTimestamp) { var manager = new WebRtcManager(virtualStudioConnection, studioComponent, jsRuntime, receivingVideoElement, rtpTimestamp); manager.handlerId = await jsRuntime.InvokeAsync <int>("WebRtcHandlerManager.createHandler"); return(manager); }
private WebRtcManager(IVirtualStudioConnection virtualStudioConnection, StudioComponentDto studioComponent, IJSRuntime jsRuntime, ElementReference receivingVideoElement, ElementReference rtpTimestamp) { this.studioComponent = studioComponent; this.virtualStudioConnection = virtualStudioConnection; this.jsRuntime = jsRuntime; this.receivingVideoElement = receivingVideoElement; this.rtpTimestamp = rtpTimestamp; objRef = DotNetObjectReference.Create(this); virtualStudioConnection.AddListener(this); }