SmoothStreamingMediaElement.ScheduleClip Method
Include Protected Members
Include Inherited Members
Include Silverlight Members
Include Windows Phone Members
Schedules playing of a media clip.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
Overload List
Name | Description | |
---|---|---|
ScheduleClip(ClipInformation, ClipContext, Object) | Schedules playing of a media clip. | |
ScheduleClip(ClipInformation, Boolean, Object) | Schedules playing of a media clip. | |
ScheduleClip(ClipInformation, Boolean, TimeSpan, Object) | Schedules playing of a media clip. | |
ScheduleClip(ClipInformation, TimeSpan, Boolean, Object) | Schedules playing of a media clip. |
Top
Remarks
The method inserts a clip that will play for its duration, after which the stream that was interrupted resumes.
There are several ways to schedule clips to play before and during a media presentation. You can schedule a clip from an event handler such as the MarkerReached event. Another scenario, known as pre-roll, can be initialized from the ManifestReady event. Clips can also be chained together by using the overload of the ScheduleClip(ClipInformation, ClipContext, Object) method that has the clipToAppendTo parameter. In this scenario, the clipToAppendTo parameter is set to the ClipContext value of another clip.
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 and for examples, see Scheduling Media Clips and Microsoft Smooth Streaming Client 2.0.
Note
Smooth Streaming clips that are 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.