SmoothStreamingMediaElement.ScheduleClip Method (ClipInformation, Boolean, Object)
Schedules playing of a media clip.
Assembly: Microsoft.Web.Media.SmoothStreaming (in Microsoft.Web.Media.SmoothStreaming.dll)
public ClipContext ScheduleClip( ClipInformation clipInfo, bool pauseTimeline, Object userData )
- Type: Microsoft.Web.Media.SmoothStreaming.ClipInformation
A ClipInformation object that represents the smooth clip to be scheduled..
- 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.
The object passed in the userData parameter is saved as the Data member of the ClipContext used by the 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.
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.