Partilhar via


CoreWebView2Environment.CreateTextureStream(String, Object) Method

Definition

Registers the stream id that the host can handle, providing a texture stream when requested from the WebView2's JavaScript code. The host can register multiple unique stream instances, each with a unique stream ID, enabling the host to stream from different sources concurrently. The host should call this only once for unique streamId. The second call of already created streamId without destroying CoreWebView2TextureStream object will return an error. d3dDevice is used for creating shared IDXGI resource and NT shared of it. The host should use Adapter of the LUID from the GetRenderAdapterLUID for creating the D3D Device.

public Microsoft.Web.WebView2.Core.CoreWebView2TextureStream CreateTextureStream (string streamId, object d3dDevice);
member this.CreateTextureStream : string * obj -> Microsoft.Web.WebView2.Core.CoreWebView2TextureStream
Public Function CreateTextureStream (streamId As String, d3dDevice As Object) As CoreWebView2TextureStream

Parameters

streamId
String
d3dDevice
Object

Returns

Applies to