CastingConnection.RequestStartCastingAsync(CastingSource) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts the process of casting to a casting device. When called, this method pairs the c sting device, if necessary, and verifies access to the casting device with the user. If the user denies the app access to the device, casting fails. Otherwise, a connection is established, and content is sent to the device. During this time, the connection state changes to connecting, then to connected. If a casting source is set, the state changes to rendering once playback begins.
public:
virtual IAsyncOperation<CastingConnectionErrorStatus> ^ RequestStartCastingAsync(CastingSource ^ value) = RequestStartCastingAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<CastingConnectionErrorStatus> RequestStartCastingAsync(CastingSource const& value);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<CastingConnectionErrorStatus> RequestStartCastingAsync(CastingSource value);
function requestStartCastingAsync(value)
Public Function RequestStartCastingAsync (value As CastingSource) As IAsyncOperation(Of CastingConnectionErrorStatus)
Parameters
- value
- CastingSource
The content to be casted.
Returns
The status of the casting connection request.
- Attributes
Remarks
This method must be called from the UI thread or an exception will be thrown. To dispatch the call to the UI thread from another thread, you can use CoreDispatcher.RunAsync.