MediaBreakManager MediaBreakManager MediaBreakManager MediaBreakManager 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 : sealed class MediaBreakManager
struct winrt::Windows::Media::Playback::MediaBreakManager
public sealed class MediaBreakManager
Public NotInheritable Class MediaBreakManager
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

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 CurrentBreak CurrentBreak CurrentBreak CurrentBreak

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

PlaybackSession PlaybackSession PlaybackSession PlaybackSession PlaybackSession

Gets the MediaPlaybackSession associated with the MediaBreakManager.

Methods

PlayBreak(MediaBreak) PlayBreak(MediaBreak) PlayBreak(MediaBreak) PlayBreak(MediaBreak) PlayBreak(MediaBreak)

Directs the MediaPlayer to begin playing the specified MediaBreak immediately.

SkipCurrentBreak() SkipCurrentBreak() SkipCurrentBreak() SkipCurrentBreak() SkipCurrentBreak()

Directs the MediaPlayer to skip over the current MediaBreak.

Events

BreakEnded BreakEnded BreakEnded BreakEnded BreakEnded

Occurs when a MediaBreak ends playback.

BreakSkipped BreakSkipped BreakSkipped BreakSkipped BreakSkipped

Occurs when a MediaBreak is skipped.

BreaksSeekedOver BreaksSeekedOver BreaksSeekedOver BreaksSeekedOver BreaksSeekedOver

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

BreakStarted BreakStarted BreakStarted BreakStarted BreakStarted

Occurs when playback of a MediaBreak starts.

See also