Share via


CastingSource 類別

定義

代表可傳送至另一部裝置的媒體內容。

public ref class CastingSource sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CastingSource final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CastingSource
Public NotInheritable Class CastingSource
繼承
Object Platform::Object IInspectable CastingSource
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

您可以藉由呼叫各自的GetAsCastingSource方法,從MediaPlayerImage或 HTML Tag 取得這個物件。 在目前版本中,應用程式應該使用MediaPlayer 和 MediaPlayerElement進行媒體播放,但舊版MediaElement控制項也會提供GetAsCastingSource方法。

屬性

PreferredSourceUri

取得或設定要與 DLNA ByRef 搭配使用之內容的替代 URI。

適用於

另請參閱