SourceChangeRequestedEventArgs
SourceChangeRequestedEventArgs
SourceChangeRequestedEventArgs
SourceChangeRequestedEventArgs
Class
Definition
Provides information about the SourceChangeRequested event.
public : sealed class SourceChangeRequestedEventArgs : ISourceChangeRequestedEventArgspublic sealed class SourceChangeRequestedEventArgs : ISourceChangeRequestedEventArgsPublic NotInheritable Class SourceChangeRequestedEventArgs Implements ISourceChangeRequestedEventArgs// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
For an example of creating a software Play To receiver, see Media casting or Media casting.
async void receiver_SourceChangeRequested(
Windows.Media.PlayTo.PlayToReceiver sender,
Windows.Media.PlayTo.SourceChangeRequestedEventArgs args)
{
if (args.Stream != null)
await dispatcher.RunAsync(
Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
var stream = args.Stream as Windows.Storage.Streams.IRandomAccessStream;
VideoPlayer.SetSource(stream, args.Stream.ContentType);
});
}
function receiver_SourceChangeRequested(args) {
if (args.stream != null) {
var mediaStream = MSApp.createBlobFromRandomAccessStream(args.stream.contentType, args.stream);
videoPlayer.src = URL.createObjectURL(mediaStream, false);
}
}
Async Sub receiver_SourceChangeRequested(
sender As Windows.Media.PlayTo.PlayToReceiver,
args As Windows.Media.PlayTo.SourceChangeRequestedEventArgs)
If args.Stream IsNot Nothing Then
Await Dispatcher.RunAsync(
Windows.UI.Core.CoreDispatcherPriority.Normal,
Sub()
Dim stream = TryCast(args.Stream, Windows.Storage.Streams.IRandomAccessStream)
VideoPlayer.SetSource(stream, args.Stream.ContentType)
End Sub)
End If
End Sub
Properties
Album Album Album Album
Gets the name of the album that contains the song in the audio stream.
public : PlatForm::String Album { get; }public string Album { get; }Public ReadOnly Property Album As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The name of the album that contains the song in the audio stream.
Author Author Author Author
Gets the author of the content in the media stream.
public : PlatForm::String Author { get; }public string Author { get; }Public ReadOnly Property Author As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The author of the content in the media stream.
Date Date Date Date
Gets the date that the content in the media stream was published.
public : IReference<DateTime> Date { get; }public Nullable<DateTimeOffset> Date { get; }Public ReadOnly Property Date As Nullable<DateTimeOffset>// You can use this property in JavaScript.
- Value
- IReference<DateTime> Nullable<DateTimeOffset> Nullable<DateTimeOffset> Nullable<DateTimeOffset>
The date that the content in the media stream was published.
Description Description Description Description
Gets the description of the content in the media stream.
public : PlatForm::String Description { get; }public string Description { get; }Public ReadOnly Property Description As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The description of the content in the media stream.
Genre Genre Genre Genre
Gets the names of the genres that the content in the media stream belongs to.
public : PlatForm::String Genre { get; }public string Genre { get; }Public ReadOnly Property Genre As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
Gets the names of the genres that the content in the media stream belongs to.
Properties Properties Properties Properties
Gets custom property names and values for the content in the media stream.
public : IMapView<string, object> Properties { get; }public IReadOnlyDictionary<string, object> Properties { get; }Public ReadOnly Property Properties As IReadOnlyDictionary<string, object>// You can use this property in JavaScript.
- Value
- IMapView<PlatForm::String, PlatForm::Object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object>
Custom property names and values for the content in the media stream.
Rating Rating Rating Rating
Gets the rating for the content in the media stream.
public : IReference<uint> Rating { get; }public Nullable<uint> Rating { get; }Public ReadOnly Property Rating As Nullable<uint>// You can use this property in JavaScript.
- Value
- IReference<unsigned int> Nullable<uint> Nullable<uint> Nullable<uint>
The rating for the content in the media stream.
Stream Stream Stream Stream
Gets the media stream for the Play To receiver.
public : IRandomAccessStreamWithContentType Stream { get; }public IRandomAccessStreamWithContentType Stream { get; }Public ReadOnly Property Stream As IRandomAccessStreamWithContentType// You can use this property in JavaScript.
- Value
- IRandomAccessStreamWithContentType IRandomAccessStreamWithContentType IRandomAccessStreamWithContentType IRandomAccessStreamWithContentType
The media stream for the Play To receiver.
Remarks
For an example of creating a software Play To receiver, see Media casting.
- See Also
Thumbnail Thumbnail Thumbnail Thumbnail
Gets the thumbnail image for the content in the media stream.
public : IRandomAccessStreamReference Thumbnail { get; }public IRandomAccessStreamReference Thumbnail { get; }Public ReadOnly Property Thumbnail As IRandomAccessStreamReference// You can use this property in JavaScript.
- Value
- IRandomAccessStreamReference IRandomAccessStreamReference IRandomAccessStreamReference IRandomAccessStreamReference
The thumbnail image for the content in the media stream.
Title Title Title Title
Gets the title of the content in the media stream.
public : PlatForm::String Title { get; }public string Title { get; }Public ReadOnly Property Title As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The title of the content in the media stream.