Easy Tutorial
❮ Jsref Setdate Prop Loc Protocol ❯

Video currentSrc Property

Video Object

Example

Get the URL of the current video:

var x = document.getElementById("myVideo").currentSrc;
http://www.w3cschool.cc/try/demo_source/movie.mp4

Definition and Usage

The currentSrc property returns the URL of the current video.

If the audio/video is not set, it returns an empty string.

Note: This property is read-only.

Tip: Use the src property to set the URL of the video file.


Browser Support

All major browsers support the currentSrc property.

Note: Internet Explorer 8 and earlier versions do not support this property.


Syntax

Technical Details

| Return Value: | String, representing the current URL of the video, including the protocol (e.g., http://). Returns an empty string if the video is not set. | | --- | --- |

❮ Jsref Setdate Prop Loc Protocol ❯