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
| 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.
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.
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.
The device you want to know about.
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.
- value
- PlatForm::String String String String
The device ID.
The object representing the casting device.
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.
The casting playback type.
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.
- castingSource
- CastingSource CastingSource CastingSource CastingSource
The casting source.
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.
The media types, CastingPlaybackTypes, supported by the device.