Partager via


MediaState

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Defines the potential states of a MediaElement object.

<object property="EnumerationValue"  .../>
value = "EnumerationValue"

Enumeration Values

Value

Description

Buffering

The MediaElement is loading the media for playback. Its Position does not advance during this state. If the MediaElement was already playing video, it continues to display the last displayed frame.

Closed

The MediaElement contains no media. The MediaElement displays a transparent frame.

Error

The MediaElement encountered an error during media playback. If the MediaElement was playing video, it continues to display the last displayed frame. This MediaElement changes to this state after raising the MediaFailed event.

Opening

The MediaElement is validating and attempting to open the Uniform Resource Identifier (URI) specified by its Source property. While in this state, the MediaElement queues any Play, Pause, or Stop commands it receives and processes them if the media is successfully opened.

Paused

The MediaElement does not advance its Position. If the MediaElement was playing video, it continues to display the current frame.

Playing

The MediaElement is playing the media specified by its source property. Its Position advances forward.

Stopped

The MediaElement contains media but is not playing or paused. Its Position is 0 and does not advance. If the loaded media is video, the MediaElement displays the first frame.

Managed Equivalent

MediaElementState

Applies To

CurrentState

See Also

Reference