HTML Audio/Video DOM currentSrc Property
HTML Audio/Video DOM Reference
Example
Get the URL of the current video:
myVid=document.getElementById("video1");
alert(myVid.currentSrc);
Try it »
Definition and Usage
The currentSrc property returns the URL of the current audio/video.
If the audio/video is not set, an empty string is returned.
Browser support





All major browsers support the currentSrc attribute.
**Note:** Internet Explorer 8 and earlier versions do not support this property.
Syntax
audio|video
.currentSrc
Technical Details
| Return Value: | A string value representing the current URL of the audio/video. |
|---|
HTML Audio/Video DOM Reference