SmoothStreamingMediaElement.ScheduleClip Method (ClipInformation, Boolean, TimeSpan, Object)

Schedules playing of a media clip.

Namespace:  Microsoft.Web.Media.SmoothStreaming
Assembly:  Microsoft.Web.Media.SmoothStreaming (in Microsoft.Web.Media.SmoothStreaming.dll)


public ClipContext ScheduleClip(
	ClipInformation clipInfo,
	bool pauseTimeline,
	TimeSpan startOffset,
	Object userData
)

Parameters

clipInfo
Type: Microsoft.Web.Media.SmoothStreaming.ClipInformation
A ClipInformation object that represents the smooth clip to be scheduled.
pauseTimeline
Type: System.Boolean
true to pause the timeline when starting a clip; false to specify that the timeline continues while the clip plays. During on-demand video playback, it is typical to pause; live video sources typically continue the video without pausing.
startOffset
Type: System.TimeSpan
The start time of the clip.
userData
Type: System.Object
An object that can contain any data needed by the application, including the SmoothStreamingMediaElement object that will play the clip.

The method inserts a clip that will play for its duration, after which the stream that was interrupted resumes.

A media clip can be scheduled for play when the SmoothStreamingMediaElement object is in a Closed state by using the ScheduleClip method with the ManifestReady event.

For more information, see Scheduling Media Clips.

NoteNote

Smooth Streaming clips scheduled by using ScheduleClip methods require manifests that start at timestamp zero and must be scheduled after the manifest is loaded. If you try to schedule a clip when the Smooth Streaming player is in an opening state, an invalidOperationException error occurs. The ScheduleClip should be called only after the ManifestReady event has occurred.

Silverlight

Supported in: 5
Show: