HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML Audio/Video DOM currentSrc Property

HTML audio Tag Reference HTML Audio/Video DOM Reference

Example

Get the current video URL:

myVid=document.getElementById("video1");
alert(myVid.currentSrc);

Try it Yourself »

Definition and Usage

The currentSrc property returns the URL of the current audio/video.

If no audio/video is set, an empty string is returned.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The currentSrc property is supported in all major browsers.

Note: This property is not supported in Internet Explorer 8 and earlier.


Syntax

audio|video.currentSrc

Technical Details

Return Value: A String, representing the URL of the current audio/video


HTML audio Tag Reference HTML Audio/Video DOM Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE