AudioStreamingAgent Class

AudioStreamingAgent Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

A background agent that performs per-track streaming for playback.


Namespace:  Microsoft.Phone.BackgroundAudio
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.

public class AudioStreamingAgent : BackgroundAgent
<AudioStreamingAgent .../>

The AudioStreamingAgent type exposes the following members.

Public methodAudioStreamingAgentCreates a new instance of the AudioStreamingAgent class.

Protected methodAbortInforms the operating system that the agent is unable to perform its intended task and that it should not be launched again until the foreground application mitigates the blocking issue and reenables the agent. (Inherited from BackgroundAgent.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodNotifyCompleteInforms the operating system that the agent has completed its intended task for the current invocation of the agent. (Inherited from BackgroundAgent.)
Protected methodNotifyCompleteWithResultInforms the operating system that the agent has completed its intended task for the current invocation of the agent. Call this method after successfully handling an invocation with a result. (Inherited from BackgroundAgent.)
Protected methodOnBeginStreamingCalled when a new track requires audio streaming because it is about to start playing.
Protected methodOnCancelTells AudioStreamingAgent that it has been cancelled. (Overrides BackgroundAgent.OnCancel().)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

If you want to create an application that uses MediaStreamSource streaming, then you have to extend the AudioStreamingAgent base class.

To release internal resources, OnCancel() must be called by derived classes. That is, the streaming agent that you create must call base.OnCancel.

Caution noteCaution:

This API is not supported for Silverlight 8.1 apps.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

© 2017 Microsoft