Change the URL of a video:
The src property sets or returns the value of the src attribute of a video.
The src attribute specifies the location (URL) of the video file.
The src property is supported in all major browsers. However, the file format defined may not be supported in all browsers.
Note: Internet Explorer 8 and earlier versions, do not support the <video> element.
Return the src property:
Set the src property:
Value | Description |
---|---|
URL |
Specifies the URL of the video file. Possible values:
|
Return Value: | A String, representing the URL of the video file. Returns the entire URL, including the protocol (like http://) |
---|
Get the URL of a video:
The result of x will be:
HTML reference: HTML <video> src attribute