Compartir a través de


AutoPlay

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

Gets or sets a value that indicates whether media will begin playback automatically when the Source property is set.

<object AutoPlay="Boolean"  .../>
value = object.AutoPlay
object.AutoPlay = value

Property Value

Type: Boolean

true if playback is automatic; otherwise, false.

This property is read/write. The default value is true.

Managed Equivalent

AutoPlay

Remarks

In script, set this property to false before setting the Source property to pause the media at load time. Call the Play method to start media playback. When opened, the media will be in Stopped state.

Applies To

MediaElement

See Also

Reference