MediaBreakManager Class

Definition

Provides information about and control over the MediaBreak objects associated with a MediaPlayer. This class provides events for when a media break starts playback, ends playback, is skipped, or is seeked over. You can also use this class to determine the currently playing MediaBreak or to start or skip playback of a MediaBreak.

public ref class MediaBreakManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MediaBreakManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MediaBreakManager
Public NotInheritable Class MediaBreakManager
Inheritance
Object Platform::Object IInspectable MediaBreakManager
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

Get an instance of this class by accessing the MediaPlayer.BreakManager property.

For how-to guidance for working with media breaks, see Create, schedule, and manage media breaks.

Properties

CurrentBreak

Gets the MediaBreak that is currently being played by the MediaPlayer.

PlaybackSession

Gets the MediaPlaybackSession associated with the MediaBreakManager.

Methods

PlayBreak(MediaBreak)

Directs the MediaPlayer to begin playing the specified MediaBreak immediately.

SkipCurrentBreak()

Directs the MediaPlayer to skip over the current MediaBreak.

Events

BreakEnded

Occurs when a MediaBreak ends playback.

BreakSkipped

Occurs when a MediaBreak is skipped.

BreaksSeekedOver

Occurs when the user seeks the media playback position past one or more pending media breaks.

BreakStarted

Occurs when playback of a MediaBreak starts.

Applies to

See also