MediaBreak MediaBreak MediaBreak MediaBreak MediaBreak Class

Definition

Represents a set of one or more MediaPlaybackItem objects that are played before, after, or at specified points during the playback of another MediaPlaybackItem.

public : sealed class MediaBreak
struct winrt::Windows::Media::Playback::MediaBreak
public sealed class MediaBreak
Public NotInheritable Class MediaBreak
var mediaBreak = new mediaBreak(insertionMethod, presentationPosition);
Attributes

Windows 10 requirements

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

Remarks

Get a reference to the currently playing MediaBreak using the constructor or by accessing the CurrentBreak property of the MediaBreakManager. When a media break begins playing, you can get a reference to the associated MediaBreak object by handling the BreakStarted event and accessing the MediaBreak property of the MediaBreakStartedEventArgs passed into the handler.

Get or set a pre-roll or post-roll media break for a media item by accessing the PrerollBreak or PostrollBreak property of the MediaBreakSchedule object associated with a MediaPlaybackItem.

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

Constructors

MediaBreak(MediaBreakInsertionMethod) MediaBreak(MediaBreakInsertionMethod) MediaBreak(MediaBreakInsertionMethod) MediaBreak(MediaBreakInsertionMethod) MediaBreak(MediaBreakInsertionMethod)

Initializes a new instance of the MediaBreak class with the specified insertion method.

MediaBreak(MediaBreakInsertionMethod, TimeSpan) MediaBreak(MediaBreakInsertionMethod, TimeSpan) MediaBreak(MediaBreakInsertionMethod, TimeSpan) MediaBreak(MediaBreakInsertionMethod, TimeSpan) MediaBreak(MediaBreakInsertionMethod, TimeSpan)

Initializes a new instance of the MediaBreak class with the specified insertion method and presentation position.

Properties

CanStart CanStart CanStart CanStart CanStart

Gets or sets a value indicating whether the MediaBreak can be played.

CustomProperties CustomProperties CustomProperties CustomProperties CustomProperties

Gets a map of key/value pairs that allow you to associate custom data with a MediaBreak.

InsertionMethod InsertionMethod InsertionMethod InsertionMethod InsertionMethod

Gets a value indicating whether the media break will interrupt the main content, causing the main content to pause while it is played, or if it will replace the main content.

PlaybackList PlaybackList PlaybackList PlaybackList PlaybackList

Gets the MediaPlaybackList containing the MediaPlaybackItem objects that will be played as part of the MediaBreak.

PresentationPosition PresentationPosition PresentationPosition PresentationPosition PresentationPosition

Gets the position within the playback of a MediaPlaybackItem at which the MediaBreak will be played.

See also