A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/elements/source below:

source ยท WebPlatform Docs

source Summary

Allows developer to specify multiple alternative media resources for media elements, such as <video> and <audio>. It does not represent anything on its own, and is used with src attribute to specify the URL.

Overview Table
DOM Interface
HTMLSourceElement
Attributes Examples
<video controls="controls">
 <source src="http://media.w3.org/2010/05/sintel/trailer.mp4"
         type='video/mp4; codecs="avc1, mp4a"/>
 <source src="http://media.w3.org/2010/05/sintel/trailer.ogv"
         type='video/ogg; codecs="theora, vorbis"/>
 <p>Your user agent does not support the HTML5 Video element.</p>
</video>

View live example

Notes Remarks

Note If you change the media file using the src property on an audio or video object, you need to call the load method before calling the play method. If you change the src and call the play() method without loading first, it will continue to play the file specified by the source element.

Related specifications
HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation
See also Related pages Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4