Compartilhar via


SRC Attribute | src Property

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Sets or gets the source URL of the media.

Syntax

HTML <ELEMENT SRC = sURL... >
Scripting [ sURL = ] object.src

Possible Values

sURL A String that specifies the URL of the media. If the URL has the keyword #sami as a suffix, it includes a .smi file type or a .sami file type for media captioning.

The property is read/write. The property has no default value.

Remarks

This property is read-only when applied to the playItem object.

HTML+TIME (Timed Interactive Multimedia Extensions) 2.0 supports media that includes captioning stream technology, called Synchronized Accessible Media Interchange (SAMI). The SRC attribute of a media element can use the #sami suffix to include captioning with media playback. For more information, see Adding Closed Captions to Digital Media and Understanding SAMI 1.0.

Security Alert  When the #sami suffix is specified with a valid URL for the SRC attribute of a media element, the contents of the SAMI stream display as text in that element. Likewise, the stream contents can be returned as the innerText of that element. For security reasons, developers should regard the SAMI stream as user input and take routine precautions against displaying unconfirmed user input as HTML instead of text. For more information, see Security Considerations: Dynamic HTML and Security Considerations: DHTML and Default Behaviors.

Applies To

t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:REF, t:VIDEO

See Also

Introduction to HTML+TIME