Video Class

Plays a media file (video or audio) in a Web page.


Namespace:  Microsoft.Web.Helpers
Assembly:  Microsoft.Web.Helpers (in Microsoft.Web.Helpers.dll)

public static class Video

The Video type exposes the following members.

Public methodStatic memberFlashPlays a video (.swf file) using the Adobe Flash player.
Public methodStatic memberMediaPlayerPlays a media file (.wmv video or audio file) using the Windows MediaPlayer player.
Public methodStatic memberSilverlightPlays a video using the Silverlight player.

This class represents a helper, which is a component that simplifies Web programming in ASP.NET Web Pages. You can use the Video class to display a media player on a Web page and specify the media file (video or audio) to play.

There are several of formats for video files, and each format typically requires a different player and a different way to configure the player. The Video class simplifies the process of embedding videos or audio files in a web page because it automatically generates the object object and Html elements that are normally used to add media to the page.

The Video class supports the following media players:

  • Adobe Flash

  • Windows MediaPlayer

  • Microsoft Silverlight

When a browser downloads a file, the browser makes sure that the file type matches the MIME type (the content type or media type of a file) that is specified for the document that is being rendered. The Video class supports the following MIME types:

  • application/x-shockwave-flash

  • application/x-mplayer2

  • application/x-silverlight-2

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