SourceChangeRequestedEventArgs SourceChangeRequestedEventArgs SourceChangeRequestedEventArgs SourceChangeRequestedEventArgs Class

Definition

Provides information about the SourceChangeRequested event.

public : sealed class SourceChangeRequestedEventArgs : ISourceChangeRequestedEventArgs
public sealed class SourceChangeRequestedEventArgs : ISourceChangeRequestedEventArgs
Public NotInheritable Class SourceChangeRequestedEventArgs Implements ISourceChangeRequestedEventArgs
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
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
var string = sourceChangeRequestedEventArgs.album;
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
var string = sourceChangeRequestedEventArgs.author;
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>
var nullable = sourceChangeRequestedEventArgs.date;
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
var string = sourceChangeRequestedEventArgs.description;
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
var string = sourceChangeRequestedEventArgs.genre;
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<Platform::String, Platform::Object> Properties { get; }
public IReadOnlyDictionary<string, object> Properties { get; }
Public ReadOnly Property Properties As IReadOnlyDictionary<string, object>
var iReadOnlyDictionary = sourceChangeRequestedEventArgs.properties;
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<unsigned int> Rating { get; }
public Nullable<uint> Rating { get; }
Public ReadOnly Property Rating As Nullable<uint>
var nullable = sourceChangeRequestedEventArgs.rating;
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
var iRandomAccessStreamWithContentType = sourceChangeRequestedEventArgs.stream;

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
var iRandomAccessStreamReference = sourceChangeRequestedEventArgs.thumbnail;

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
var string = sourceChangeRequestedEventArgs.title;
Value
Platform::String string string string

The title of the content in the media stream.

See Also