CastingDevice CastingDevice CastingDevice CastingDevice Class

Definition

Represents a physical device that is capable of supporting casting connections and rendering media content sent to it.

public : sealed class CastingDevice : ICastingDevicepublic sealed class CastingDevice : ICastingDevicePublic NotInheritable Class CastingDevice Implements ICastingDevice// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Get an instance of this class by accessing the CastingConnection.Device or VastingDeviceSelectedEventArgs.SelectedCastingDevice property.

Properties

FriendlyName FriendlyName FriendlyName FriendlyName

A human-readable name for the device, retrieved from the device itself.

public : PlatForm::String FriendlyName { get; }public string FriendlyName { get; }Public ReadOnly Property FriendlyName As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The human-readable name for the device.

Icon Icon Icon Icon

An icon representing the device.

public : IRandomAccessStreamWithContentType Icon { get; }public IRandomAccessStreamWithContentType Icon { get; }Public ReadOnly Property Icon As IRandomAccessStreamWithContentType// You can use this property in JavaScript.

Id Id Id Id

The device ID. This is the same ID used with Windows.Devices.Enumeration APIs.

public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The device's ID.

Methods

CreateCastingConnection() CreateCastingConnection() CreateCastingConnection() CreateCastingConnection()

Creates a new CastingConnection object. This method does not establish a connection to the casting device.

public : CastingConnection CreateCastingConnection()public CastingConnection CreateCastingConnection()Public Function CreateCastingConnection() As CastingConnection// You can use this method in JavaScript.
Returns

The object that represents the casting connection.

DeviceInfoSupportsCastingAsync(DeviceInformation) DeviceInfoSupportsCastingAsync(DeviceInformation) DeviceInfoSupportsCastingAsync(DeviceInformation) DeviceInfoSupportsCastingAsync(DeviceInformation)

Indicates whether the given device (a DeviceInformation object) supports casting.

public : static IAsyncOperation<PlatForm::Boolean> DeviceInfoSupportsCastingAsync(DeviceInformation device)public static IAsyncOperation<bool> DeviceInfoSupportsCastingAsync(DeviceInformation device)Public Static Function DeviceInfoSupportsCastingAsync(device As DeviceInformation) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Parameters
device
DeviceInformation DeviceInformation DeviceInformation DeviceInformation

The device you want to know about.

Returns

True if the device supports casting; false otherwise.

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Gets a CastingDevice object for a given a device ID (acquired from a query using the Windows.Devices.Enumeration APIs).

public : static IAsyncOperation<CastingDevice> FromIdAsync(PlatForm::String value)public static IAsyncOperation<CastingDevice> FromIdAsync(String value)Public Static Function FromIdAsync(value As String) As IAsyncOperation( Of CastingDevice )// You can use this method in JavaScript.
Parameters
value
PlatForm::String String String String

The device ID.

Returns

GetDeviceSelector(CastingPlaybackTypes) GetDeviceSelector(CastingPlaybackTypes) GetDeviceSelector(CastingPlaybackTypes) GetDeviceSelector(CastingPlaybackTypes)

Gets an AQS filter string to be used with the Windows.Devices.Enumeration APIs for a given CastingPlaybackTypes.

public : static PlatForm::String GetDeviceSelector(CastingPlaybackTypes type)public static string GetDeviceSelector(CastingPlaybackTypes type)Public Static Function GetDeviceSelector(type As CastingPlaybackTypes) As string// You can use this method in JavaScript.
Parameters
Returns
PlatForm::String string string string

The AQS filter string.

GetDeviceSelectorFromCastingSourceAsync(CastingSource) GetDeviceSelectorFromCastingSourceAsync(CastingSource) GetDeviceSelectorFromCastingSourceAsync(CastingSource) GetDeviceSelectorFromCastingSourceAsync(CastingSource)

Gets an AQS filter string to be used with the Windows.Devices.Enumeration APIs for a given CastingSource.

public : static IAsyncOperation<PlatForm::String> GetDeviceSelectorFromCastingSourceAsync(CastingSource castingSource)public static IAsyncOperation<string> GetDeviceSelectorFromCastingSourceAsync(CastingSource castingSource)Public Static Function GetDeviceSelectorFromCastingSourceAsync(castingSource As CastingSource) As IAsyncOperation( Of string )// You can use this method in JavaScript.
Parameters
castingSource
CastingSource CastingSource CastingSource CastingSource

The casting source.

Returns

The AQS filter string.

GetSupportedCastingPlaybackTypesAsync() GetSupportedCastingPlaybackTypesAsync() GetSupportedCastingPlaybackTypesAsync() GetSupportedCastingPlaybackTypesAsync()

Gets the media types supported by the device. containing

public : IAsyncOperation<CastingPlaybackTypes> GetSupportedCastingPlaybackTypesAsync()public IAsyncOperation<CastingPlaybackTypes> GetSupportedCastingPlaybackTypesAsync()Public Function GetSupportedCastingPlaybackTypesAsync() As IAsyncOperation( Of CastingPlaybackTypes )// You can use this method in JavaScript.
Returns