ScheduleClip Method (ClipInformation, ClipContext, Object)

Schedules play of a media clip.

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

Public Function ScheduleClip ( _
	clipInfo As ClipInformation, _
	clipToAppendTo As ClipContext, _
	userData As Object _
) As ClipContext
Dim instance As SmoothStreamingMediaElement
Dim clipInfo As ClipInformation
Dim clipToAppendTo As ClipContext
Dim userData As Object
Dim returnValue As ClipContext

returnValue = instance.ScheduleClip(clipInfo, _
	clipToAppendTo, userData)


Type: Microsoft.Web.Media.SmoothStreaming..::..ClipInformation
A ClipInformation object.
Type: Microsoft.Web.Media.SmoothStreaming..::..ClipContext
A ClipContext object to which the new clip will be appended.
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. Clips can be chained together by using this overload of the ScheduleClip(ClipInformation, ClipContext, Object) method. In that case, the clipToAppendTo parameter is set to the ClipContext instance of another clip. For more information and for examples, see Scheduling Media Clips (IIS Smooth Streaming) and IIS Smooth Streaming Client 1.5.

The object passed in the userData parameter is saved as the Data member of the ClipContext used by the ScheduleClip(ClipInformation, Boolean, Object) method. The application can pass anything it requires in this parameter. The SmoothStreamingMediaElement object is usually included in userData. Later the data can be cast to type SmoothStreamingMediaElement (for example, (SmoothStreamingMediaElement)clipContext.Data) in order to retrieve the Smooth Player that generated the ClipContext instance. If the application requires more information, it can create a class to contain all the information and then pass that type using the userData parameter.

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.


IIS Smooth Streaming Clips scheduled by using ScheduleClip methods require manifests that start at timestamp zero.


Supported in: 4