AdaptiveMediaSource.CreateFromStreamAsync 方法

定义

重载

CreateFromStreamAsync(IInputStream, Uri, String)

从提供的输入流异步创建 AdaptiveMediaSource 对象。

CreateFromStreamAsync(IInputStream, Uri, String, HttpClient)

从提供的输入流异步创建 AdaptiveMediaSource 对象。

CreateFromStreamAsync(IInputStream, Uri, String)

从提供的输入流异步创建 AdaptiveMediaSource 对象。

public:
 static IAsyncOperation<AdaptiveMediaSourceCreationResult ^> ^ CreateFromStreamAsync(IInputStream ^ stream, Uri ^ uri, Platform::String ^ contentType);
/// [Windows.Foundation.Metadata.Overload("CreateFromStreamAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<AdaptiveMediaSourceCreationResult> CreateFromStreamAsync(IInputStream const& stream, Uri const& uri, winrt::hstring const& contentType);
[Windows.Foundation.Metadata.Overload("CreateFromStreamAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<AdaptiveMediaSourceCreationResult> CreateFromStreamAsync(IInputStream stream, System.Uri uri, string contentType);
function createFromStreamAsync(stream, uri, contentType)
Public Shared Function CreateFromStreamAsync (stream As IInputStream, uri As Uri, contentType As String) As IAsyncOperation(Of AdaptiveMediaSourceCreationResult)

参数

stream
IInputStream

从中创建 AdaptiveMediaSource 的输入流。

uri
Uri Uri

统一资源标识符 (源的 URI) 。 AdaptiveMediaSource 使用它来解析相对 URI。

contentType
String

Platform::String

winrt::hstring

标识源的 MIME 内容类型的字符串。 这可以是 Http 实时流式处理 (HLS) ,也可以是基于 HTTP (DASH 的动态自适应流式处理) 内容类型。

返回

成功完成后返回 AdaptiveMediaSourceCreationResult

属性

另请参阅

适用于

CreateFromStreamAsync(IInputStream, Uri, String, HttpClient)

从提供的输入流异步创建 AdaptiveMediaSource 对象。

public:
 static IAsyncOperation<AdaptiveMediaSourceCreationResult ^> ^ CreateFromStreamAsync(IInputStream ^ stream, Uri ^ uri, Platform::String ^ contentType, HttpClient ^ httpClient);
/// [Windows.Foundation.Metadata.Overload("CreateFromStreamWithDownloaderAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<AdaptiveMediaSourceCreationResult> CreateFromStreamAsync(IInputStream const& stream, Uri const& uri, winrt::hstring const& contentType, HttpClient const& httpClient);
[Windows.Foundation.Metadata.Overload("CreateFromStreamWithDownloaderAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<AdaptiveMediaSourceCreationResult> CreateFromStreamAsync(IInputStream stream, System.Uri uri, string contentType, HttpClient httpClient);
function createFromStreamAsync(stream, uri, contentType, httpClient)
Public Shared Function CreateFromStreamAsync (stream As IInputStream, uri As Uri, contentType As String, httpClient As HttpClient) As IAsyncOperation(Of AdaptiveMediaSourceCreationResult)

参数

stream
IInputStream

从中创建 AdaptiveMediaSource 的输入流。

uri
Uri Uri

统一资源标识符 (源的 URI) 。 AdaptiveMediaSource 使用它来解析相对 URI。

contentType
String

Platform::String

winrt::hstring

标识源的 MIME 内容类型的字符串。 这可以是 Http 实时流式处理 (HLS) ,也可以是基于 HTTP (DASH 的动态自适应流式处理) 内容类型。

httpClient
HttpClient

AdaptiveMediaSource 应用于下载资源的 HttpClient 实例。 这使你可以为请求指定自定义 HTTP 标头。

返回

成功完成后返回 AdaptiveMediaSourceCreationResult

属性

另请参阅

适用于