HTML Audio/Video DOM Reference
Change the source of the video:
More "Try it Yourself" examples below.
The src property sets or returns the current source of the audio/video.
The source is the actual location (URL) of the audio/video file.
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
src | Yes | 9.0 | 3.5 | Yes | Yes |
Return the src property:
Set the src property:
Value | Description |
---|---|
URL | Specifies the URL of the audio/video source.
Possible values:
|
Return Value: | A String, representing the URL of the audio/video file. Returns the entire URL, including the protocol (like http://) |
---|
Get the source (URL) of a video: