HTML DOM Video currentSrc property
Examples
Get the current URL of the video:
var x = document.getElementById ( "myVideo") currentSrc.;
x The output is: http://www.w3cschool.cc/try/demo_source/movie.mp4
try it"
Definition and Usage
currentSrc familiar returns the current URL of the video.
If no audio / video, an empty string is returned.
Note: This property is read-only attribute.
Tip: Use the src attribute set the URL of the video file.
Browser Support
All major browsers support currentSrc property.
Note: Internet Explorer 8 and earlier versions of IE does not support this property.
grammar
videoObject .currentSrc
technical details
return value: | String that represents the current URL of the video, return entity URL, including the protocol part (such as http: //). If the video is not set, returns an empty string. |
---|
Video Object