Share via


ClipContext Class

Context information for a Smooth Streaming media clip. This information is Read-only and specific to clip.

Inheritance Hierarchy

System.Object
  Microsoft.Web.Media.SmoothStreaming.ClipContext

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

Syntax

'Declaration

Public Class ClipContext
'Usage

Dim instance As ClipContext
public class ClipContext
public ref class ClipContext
type ClipContext =  class end
public class ClipContext

The ClipContext type exposes the following members.

Properties

  Name Description
Public property ClipInformation Gets or sets the ClipInformation property.
Public property CurrentClipState Gets the CurrentClipState property.
Public property Data Gets or sets the Data property.
Public property HasQuartileEvents Gets or sets the HasQuartileEvents property. This value specifies whether the clip context has inserted quartile event markers into the clip.
Public property NaturalDuration Gets the natural duration for the clip.
Public property PlaybackDuration Gets or sets the playback duration.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Remarks

This class provides information about the clip to be played. You do not have to track the values of the properties of this class because they are available with each event. For more information, see Scheduling Media Clips.

Examples

If the user clicks on the SmoothStreamingMediaElement surface while an inserted clip is playing, the delegate method that handles the event can access the Microsoft.Web.Media.SmoothStreaming.ClipContext from the ClipEventArgs. The ClipInformation property contains the Microsoft.Web.Media.SmoothStreaming.ClipInformation.ClickThroughUrl that was assigned when the ClipInformation object was initialized.

The following delegate opens a new browser window for the Microsoft.Web.Media.SmoothStreaming.ClipInformation.ClickThroughUrl.

void SmoothPlayer_ClipClickThrough(object sender, ClipEventArgs e)
    {
        System.Windows.Browser.HtmlPage.Window.Navigate(e.Context.ClipInformation.ClickThroughUrl, "_newWindow");
    }

Version Information

Silverlight

Supported in: 5

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Web.Media.SmoothStreaming Namespace